-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal errors not reported in vercel logs #524
Comments
Hi @fascinated, so far I didn't check Vercel logs for this type of exceptions, I must take a look. |
Thanks for the quick response <3. Here's an example "fatal error" script, this will return 500 as expected, but the error itself will not be in the logs:
It's also worth noting that if you change this script to something like [below] such that there's some output before the fatal error, then Vercel will not report a 500 at all (and the logging behavior is the same). I sorta get why this is (200 header + output already sent), but if memory serves right, the common nginx/php-fpm setup would still produce an error in this case. Is this one a buffering issue specifically?
|
Under the hood, there is simple PHP built-in development server. If you start your script like that |
Yeah, I was thinking it's some stdout/stderr thing, but it seems all of the output from php -S just goes to stderr, so maybe there's something else. |
I have a few basic "route all requests to php"-style deployments on vercel, and I am noticing that when these deployments encounter a Fatal Error (for ex, some silly type issue like trying to read from a null as if it was an array ;p), the Fatal error message does not appear in the Vercel logs.
Has anyone else encountered this? Is there a workaround?
My only php.ini tweak is "display_errors = Off", which shouldn't affect this.
Using this simple vercel.json, for reference:
The text was updated successfully, but these errors were encountered: