What should I do if the website prompts a 500 error? Open the website prompt 500 error solution

Generally, the 500 error is caused by the following problems
: 1. Incorrect pseudo-static rules
2. PHP version is not compatible with the website program
3. The website cannot connect to the database (that is, the database configuration file of the site is not configured or misconfigured)
4. PHP is disabled A certain function needs to be enabled.
5. The site needs to access the external directory, and the anti-cross-site processing needs to be turned off.
6. The source code itself has a BUG.


According to the tutorial, turn on the php error prompt to see what is the reason for

choosing the php used by the website first. Version
 



Open the error prompt of php.
Modify the configuration file and change display_errors = Off to display_errors = On.
Restart php after the modification

.



You will see what error occurred in what file and how many lines.
You need to check the source code yourself.




If you open the webpage and display a white screen and nothing is displayed,
modify the php configuration file and adjust the error promotion level to the lowest to display all errors.
Change error_reporting= E_ALL & ~E_NOTICE  to  error_reporting= E_ALL and restart
php




 

Guess you like

Origin blog.csdn.net/evening__breeze/article/details/131289727