Home >Backend Development >PHP Problem >What is the php 500 error?
500 error is an internal server error. Solution: You can log in to the server and find the "php.ini" configuration file, find "display_errors", change the following off to on, save and upload it to the server, and then restart the php service.
500 error is an internal server error
When accessing the php page, a 500 error occurs. This is Because there is an error in the PHP code, the PHP environment will display a 500 error status code. For most webmasters, such error codes are not conducive to finding the problem. How to solve it?
If it is a VPS or server and you are an administrator, you can log in to the server and find the php.ini configuration file, find display_errors, change the following off to on, save and upload it to the server, and restart the php service. . If it is a virtual host, some virtual hosts can be set up, but if they cannot be set up, there is nothing you can do.
After following the above steps, the php code error will no longer display the 500 status code, and will prompt where the error is, which is convenient for the webmaster to find out the problem with the php code. If it is in a formal environment, you can Add error_reporting(0); code to the header of the php file code to block error display!
Recommended tutorial: "php tutorial"
The above is the detailed content of What is the php 500 error?. For more information, please follow other related articles on the PHP Chinese website!