I've been using php wkhtmltopdf and noticed that when using the proc_close function on windows, it returns a value of 2. I've looked for what this exit code means and I can't seem to spot a reference to it. The two codes for proc_close seem to be 0 and -1. I was wondering if anyone could shed some more light on what this error code means. Many thanks.
Asked
Active
Viewed 415 times
1 Answers
1
The manual says:
(proc_close) Returns the termination status of the process that was run. In case of an error then -1 is returned.
So the process returns 2 which is likely an error code. Check the documentation of the process you are calling for the meaning of that error state

hek2mgl
- 152,036
- 28
- 249
- 266
-
@r1901156 Thank you too, for pointing me towards this tool. I've had a look into the source code. It will return `2` in case the html document was not found (404).. Also there are [PHP bindings](https://github.com/mreiferson/php-wkhtmltox). It might be better to use that bindings than to call the binary – hek2mgl Aug 19 '13 at 11:30