Forum


Replies: 1   Views: 4234
Pdf conversion issue (libreoffice + apache)
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 roly  · 28-01-2015 - 04:35

Hi, I got the warning below when run "examples/FormatConversion/transformDocument/sample_1.php" from browser Warning: rename(example_text.pdf,example_text.pdf): No such file or directory in /var/www/automatedadvice.com.au/ifa/phpdocx4.5/classes/TransformDocAdvLibreOffice.inc on line 80 However, it works correctly if it's called from CLI. I have tried changing the method to script and specifying a temp folder. Neither worked. Could you please help? Thanks

Posted by admin  · 28-01-2015 - 12:55

Hello, That issue is related to how Apache works. We're going to add new documentation about how to solve it, but here goes a brief summary. Apache has a 'user' that uses to run the scripts, a common user is www-data. This user has a default HOME, such as the default /var/www for www-data. When LibreOffice runs, it needs to use a .config folder in the HOME folder to write some temp files. So you need to check if this folder has rw access for the Apache user. For example using a Debian OS with Apache 2, you just need to set rw to the folder /var/www/.config to the user www-data. Regards.