ok so I have an application that I need to test locally using my MAMP Pro installation and LibreOffice (ver 4.4.1)
when I execute the following commands in terminal it works just fine:
cd /Applications/LibreOffice.app/Contents/MacOS
./soffice --headless --convert-to pdf /Users/myusername/Sites/my-site/_plugins/site-pages/public/build-pages/temp/*.docx --outdir /Users/myusername/Sites/my-site/_plugins/site-pages/public/build-pages/temp
but when I try to replicate this in my php script like so:
$myCommand = '/Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to pdf /Users/myusername/Sites/my-site/_plugins/site-pages/public/build-pages/temp/*.docx --outdir /Users/myusername/Sites/my-site/_plugins/site-pages/public/build-pages/temp';
## create pdf's
exec($myCommand,$output);
foreach($output as $line){
print $line;
}
It doesn't work, what am I doing wrong ?