Open joanhey opened 5 years ago
@joanhey I commited an PR to fix the problem, return 500 when there're some PHP errors. https://github.com/rryqszq4/ngx_php7/pull/22
And a 404 when can't include a php file from the nginx config. If it's possible. Perhaps add an ngx_include (file) in php or php_include(file) in nginx config, for use in the nginx config and raise a 404 error when fail. The rest of php normal include will show a 500 error.
I don't know if actually can intercept the headers from apps to send it to the client.
But the 500 is good for now.
@joanhey The nginx directive of include php file is unstable at present, so i have not release it. I think that return 404 when not found file was can be achieve.
When there are errors never return a 4xx or 5xx. Always return a socket read error.
So we don't know if it is a problem with PHP or with the socket or nginx.
The error log show exactly the errors.