EXEC Error Output Tip

I had issues today with exec not working. I tried

exec("whoami", $output, $return_var));

But that was not helping.

With some searching I found this:

Add 2>&1 to the end of your command to understand the exact error.

exec('wkhtmltopdf http://somesite.com /home/user/file.pdf 2>&1');

Source



Leave a Reply

Your email address will not be published. Required fields are marked *