I'm having issues using oowriter to convert a doc to a pdf using php exec()
. The line i'm running below works fine in CLI, just not in php using exec().
$stdin = "/usr/bin/oowriter --headless --convert-to pdf -outdir /var/data/uploads/ /var/data/uploads/lorem.docx";
exec($stdin,$stdout,$return_int);
$stdout
returns an empty Array
and $return_int
returns 0
.
I've searched around and the only possible solution I could find was adding the path to oowriter (which you can see i have done). Is there a permissions issue running this command as the apache user? There are a few posts on exec() not working in general, but I can successfully run commands for imagemagick using this method. Therefore it seems to me that this an application specific configuration issue with openoffice.
Appears to be a duplicate of the following, but no answers have been posted:
unable to run oowriter as web user
FYI I'm using CentOS V6.1 and PHP v5.3.3. Thanks.