I have the following issue I am using Ubuntu and I am using a simple libreOffice conversion command
$command_conversion = 'libreoffice --headless --convert-to pdf:writer_pdf_Export --outdir /home/stilian/Desktop /home/stilian/Desktop/sample.doc';
exec($command_conversion. $output);
The command is working fine in the terminal but not when I open the webpage to execute the command. I also double checked for errors in the command there are none. also the variable $output is an empty array. Any suggestions would be appriciated.
libreofficein the PATH of the webserver user (www-data usually)$_SERVER["PATH"]and make sure the path tolibreofficebinary is in the path variable e.g. dowhich libreofficeand if e.g. the result is/usr/local/bin/libreofficeyou need to check if/usr/local/binis in$_SERVER["PATH"]