[eluser]Unknown[/eluser]
I came across this thread while searching everywhere for a solution to this problem. I have a simple wget script, to post files, that depends on the status code being correct, if the post request fails but the web app replies with status 200 then data will be lost. So, the solution...
You need to have php.ini configured properly, for production use, for PHP to return HTTP 500 status code on parse errors.
Code:
display_errors = Off
log_errors = On
error_log = /the/path/to/phperrors.log
You need a version of PHP >= 5.2.4