php - A 500 error occurred during the post request. Where can I find the cause? There is no corresponding log in the error_log in the background.
天蓬老师2017-05-16 13:02:30
0
11
1078
A 500 error occurred during the post request. Where can I find the cause? I looked at the error_log in the background and there is no corresponding log
The 500 error is basically the code, or the code is not comprehensive and does not consider the zero point. You can take a look at the error log of php. As for what you are talking about 后台的error_log, it is not very clear
2. Is the client request received by the server correct?
3. Use a tool to send the client’s request data directly to the server, and then track the server program or various logs on the server to see where the problem lies.
4. If the server feeds back the correct result, then use a tool to push the result directly back to the client to see if the client received it correctly? And how does the client react?
The server is installed with lnmpa,,,,php,apache,nginx. I have read the corresponding errorlogs below, but there is no corresponding information about this 500 error
Yes The maximum memory occupied by the script (memory_limit): 192M exceeds
Enable PHP configuration to output PHP code errors in the form of logs. The generated error log files are generally in the root directory where the program is located.
Develop a good habit. When returning information (especially the return of API classes without front-end), be sure to use try and catch to handle it, and record exceptions in the log
500 is an error in the code. Set breakpoints everywhere in the code and check. The most likely reason is that there is an error in the database connection, or there is an infinite loop in a certain part of the program!
Add
in the entry file forum.php
This will print out the error stack
The 500 error is basically the code, or the code is not comprehensive and does not consider the zero point.
You can take a look at the error log of php.
As for what you are talking about
后台的error_log
, it is not very clearStart reporting errors at a glance, display_errors
There should be an error stack below your
Response
这个tab
, if not, in your entry file:1. Has the server received the client’s request?
2. Is the client request received by the server correct?
3. Use a tool to send the client’s request data directly to the server, and then track the server program or various logs on the server to see where the problem lies.
4. If the server feeds back the correct result, then use a tool to push the result directly back to the client to see if the client received it correctly? And how does the client react?
500 means an error occurred on the server side, there is no need to look for front-end problems
The server is installed with lnmpa,,,,php,apache,nginx. I have read the corresponding errorlogs below, but there is no corresponding information about this 500 error
Yes The maximum memory occupied by the script (memory_limit): 192M exceeds
Enable PHP configuration to output PHP code errors in the form of logs. The generated error log files are generally in the root directory where the program is located.
Develop a good habit. When returning information (especially the return of API classes without front-end), be sure to use try and catch to handle it, and record exceptions in the log
500 is an error in the code. Set breakpoints everywhere in the code and check. The most likely reason is that there is an error in the database connection, or there is an infinite loop in a certain part of the program!