Soffice command not executed in php shell_exec ()

I shell_exe() this command in shell_exe() as shown below:

 shell_exec('/usr/bin/soffice --headless --convert-to html:HTML --outdir /home/admin/Desktop/ /home/admin/Desktop/text.docx'); 

But it gives me such an error in the apache error log:

Error: Please repeat the input parameters ...

So please help me.

+5
source share
1 answer

The error you received is not related to PHP / apache.

This is the output of soffice .

So, shell_exec() works without problems, even the executed command returned the result that was returned to shell_exec() .

How to run soffice I recommend search forums: https://ask.libreoffice.org/en/question/2641/convert-to-command-line-parameter/

To get the error output, it is better to use the exec() function instead of shell_exec()

getting the status of output and exit from shell_exec ()

https://unix.stackexchange.com/questions/15264/executing-a-shell-command-from-php-with-shell-exec

0
source

Source: https://habr.com/ru/post/1274021/


All Articles