Solution to PHP has encountered a Stack overflow Problem

  • 2021-07-24 10:21:17
  • OfStack

After transferring an disucz forum last night, I found that there was one more PHP has encountered a Stack overflow on the open page last time, which was translated as "PHP encountered stack overflow". I feel strange. If no one visits the new station, how can it overflow? All right, go to discuz official forum to find a solution.

The first solution found is to update the background cache, but the result is not good. Next, check the database configuration file, and there are no errors. There is no error in checking php permissions.

Some people in discuz official website say that the version of php is too low, and individuals are disgusted with this kind of people, which is bullshit. There is no need to verify it.


Comparing the old and new servers, I found a problem, and the paths of the two are different. I immediately went to check the authority of the superior directory folder, and it turned out that there was a problem with the authority. The file path is D:/www/discuz. The www and discuz folder permissions on the old server have "anonymous guest permissions". Go to the new server and see that the www folder does not have "anonymous guest permission", while the discuz folder permission does. Describes the problem caused by insufficient permissions in the previous level 1 directory. Give 1 permission again. ok perfectly solves the problems of PHP has encountered a Stack overflow.

Having said so much above, it is actually a sentence:

Under the windows server, it is due to permission problems, specifically, the upper level 1 directory permission problems.

For example:

The original site directory was d:\ www\ jb51

A quick and secure solution is to create a new directory webroot under the jb51 directory, and the permissions of this directory are the same as those of jb51.

The current website directory is: d:\ www\ jb51\ webroot.

Nowadays, many php systems have errors due to this problem, such as discuz, phpmyadmin and so on.


Related articles: