Today, when a customer uses vps to install discuz, there is always an http500 error. at first, he thought there was a problem with the customer's program, because the server reports a 500 error due to a program error in http500, however, he insisted that it was downloaded from the official website. it was strange that the environment was normal when the probe was checked and the folder permission was also normal.
Today, a customer is using vps for installation.DiscuzHttp500 errors always occur. at first, I thought there was a problem with the client's program, because the server reported 500 errors due to errors in the HTTP program, but he insisted that it was downloaded from the official website, which was strange, after checking the probe, the environment is normal, and reading the folder permissions is normal, there is no way to track the program step by step. after tracking several files, it is found that an error is reported in The require field, strange, is the file not found? But the file does exist. I checked the various possibilities that require caused http500 on the Internet, and finally found a solution!
The cause is as follows:
When installing discuz, the customer puts the discuz installation directory under the root directory of the disk, such as D: \, and the root directory of the D disk does not grant the corresponding permissions, so require (. /xxx. php) when such a statement is executed, an http500 error occurs due to permission issues. after finding the cause of the problem, I will put the customer's website to D: \ wwwroot \ website directory. after placing the Directory, set the read permission for wwwroot. The problem is solved after the setting.
Finally, the cause of this problem is the index of programs such as discuz and wordpress. require (. /xxx. php). if the program is placed in a directory where the IUSER _ user does not have the read permission, this permission problem occurs.
Solution 1
Change require (./xxx. php) to require (xxx. php ).
Solution 2
Grant iuser_user read permission to the parent directory of the website.