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



天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(11)
大家讲道理

Add
in the entry file forum.php

ini_set('display_errors','On');
error_reporting(E_ALL);

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 clear

左手右手慢动作

Start reporting errors at a glance, display_errors

左手右手慢动作

There should be an error stack below your Response这个tab, if not, in your entry file:

<?php
try {
    // any of your code
} catch(Exception $e) {
    echo "Exception\n", $e.getTraceAsString();
}
淡淡烟草味

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

Peter_Zhu

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!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template