What is 'in Unknown on line 0' in php error log
I'm getting multiple warnings in my php-fpm error log such as below:
PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0 PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0 PHP Warning: Missing boundary in multipart/form-data POST data in Unknown on line 0
I tried to google these errors but I need to know what 'in Unknown on line 0' exactly mean to better understand the errors above and solve them properly.
An error in
Unknown on line 0is triggered by the code that runs before your script starts.
Such code could be a file configured in
auto_prepend_file, a PHP extension or by the interpreter's code that prepares the context for your script to run.
In this case it seems the error is triggered by the PHP code that parses the query string and the request body (for
POSTrequests) and populates
The second line of the error message says there are too many variables in the request body (do you generate the form dynamically?).
The second line says the request body is malformed and it doesn't end as expected.