Forum


Replies: 8   Views: 4485
Transformdocument doesn't create output - v4.5
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by seb  · 05-03-2015 - 09:21

Ok I've found the problem. The conversion script works on the command line, but not through a web browser. The reason for this is the temporary ODT file it creates (like /tmp/tempOdt_54f81bba0e6ed.odt) has very low permissions on it: -rw------- 1 www-data www-data So the conversion java command always fails because it cannot read the input file. And because all script output is sent to dev/null you never get this error appear on the web page. I've fixed this by adding passthru('chmod 444 '.$tempDoc); just after line 112 after the initial passthru() command. While this works, is there a better way to do this? Thanks, Seb