In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article editor for everyone to introduce in detail "what is the cause of php error", the content is detailed, the steps are clear, the details are handled properly, I hope this article "what is the cause of php error" can help you solve your doubts, the following follow the editor's ideas slowly in-depth, together to learn new knowledge.
The reasons for the 500 errors in php: 1, there are syntax errors in the PHP program, as long as the error information is exposed, and then the problem can be solved according to the information; 2, there is insufficient disk space, there is not enough space to read and write data, resulting in 500 errors.
Operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer
For the http request error status code is 500, usually interpreted as: the server encountered an error, can not complete the request (that is, the server internal error), but the specific problems need to be analyzed in detail, the following are some 500 problems and solutions.
1. Syntax errors in PHP programs lead to
Scene 1: our project is equipped with alarm monitoring (regularly visiting a fixed link to the website every 10 minutes). There was a time when we received emails reporting 500 errors two or three times a day, but the access was normal when we visited it manually.
This should be the most common error, grammatical errors can also be quickly repeated, as long as the error information is exposed, it can be solved immediately according to the problem.
If you are in a local or test environment, we usually do this by setting the output error message in the program entry:
Error_reporting (E_ALL ^ E_NOTICE); / / disable the error output to the page ini_set ('display_errors', 0); / / set the error message to be output to the file ini_set (' log_errors', 1); / / specify the error log file name $error_dir ='/ logs/err/';$error_file = $error_dir. Date ('Ymd').' .log'; / / create if (! is_dir ($error_dir)) {mkdir ($error_dir, 0777, true) if the directory does not exist; if (! file_exists ($error_file)) created if the file does not exist) {$fp = fopen ($error_file, 'error_file'); if ($fp) {fclose ($fp) }} / / set the error output file ini_set ("error_log", $error_file); / / the program executes logic normally.
Second, the disk is full and leads to
Scene 2: upload pictures and keep reporting an error of 500.
500 errors caused by insufficient disk space and insufficient space to read and write data are extremely uncommon and are not easy to detect in time. Usually encounter 500 problems, quickly think of program errors, in fact, there may also be insufficient disk space, if you want to find any problems in the program, you can check whether it is a lack of disk space.
Df-h to check disk space usage
Read here, this article "what is the reason for the php error" has been introduced, want to master the knowledge of this article still need to practice and use to understand, if you want to know more about the article, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.