6

I have run this command in shell_exe() function 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 error like this in apache error log:

Error: Please reverify input parameters...

4
  • Just to clarify: Does this command work on the server? Commented Dec 13, 2017 at 6:19
  • @xanoetux yes this command works fine. Commented Dec 13, 2017 at 6:20
  • Maybe safe mode is active? Commented Dec 13, 2017 at 6:21
  • @xanoetux safe mode is not active. Commented Dec 13, 2017 at 6:28

1 Answer 1

0

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

It is an soffice output.

So shell_exec() works without problems even the executed command returned an output that was passed back to the shell_exec() function.

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

To receive the error output is better to use exec() function instead of shell_exec()

getting output and exit status from shell_exec()

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

Sign up to request clarification or add additional context in comments.

7 Comments

This error is coming from php. I have seen in apache error log. soffice command works well in terminal directly.
Try redirecting the error output to the standard output using 2>&1
The same error is being displayed in browser which is shown in error.log.
Still the error is coming from soffice.. not from PHP. Apache only deliver the message from CLI back to your application and print it.
But how can you know that error is coming from soffice not from php. Please let me know.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.