PHP has encountered a Stack overflow问题解决方法
这篇文章主要介绍了PHP has encountered a Stack overflow问题解决方法,需要的朋友可以参考下
昨晚将一个disucz论坛进行转移后,发现打开的页面上回多一个PHP has encountered a Stack overflow 这个提示错误,进过翻译为“PHP遇到堆栈溢出”。我就感觉奇怪了,新站没人访问的,怎么可能会溢出。 好吧去discuz官方论坛找找解决方法。
找到的第一解决方法,更新后台缓存,结果不行。接下来检查数据库配置文件,也没有错误。检查php权限也没有错误。
discuz官网有人说是php版本太低了,个人对于这种人是比较反感的,这种说法比较扯淡。不用去验证了。
把新旧的服务器对比较,,发现了一个问题,两个的路径都不同,马上去查看上级目录文件夹权限,果然是权限出现了问题。文件路径是D:/www/discuz. 查看到旧的服务器上面www和discuz文件夹权限有“匿名来宾权限”。 在去新服务器上面看到www文件夹没有“匿名来宾权限” 而discuz文件夹权限则是有的。 说明上一级目录权限不足导致的。 重新给一下权限。 ok完美解决PHP has encountered a Stack overflow的问题。
上面说了这么多,其实就是一句话:
在windows服务器下面都是因为权限问题,具体来说是上一级目录权限问题。
例如:
原来的网站目录是 d:\www\jb51
快速安全的解决方法就是在jb51目录下,新建一个目录 webroot,而且这个目录的权限跟jb51权限是一样的。
现在的网站目录就是:d:\www\jb51\webroot即可。
现在很多php系统都是因为这个问题导致出错例如 discuz、phpmyadmin等。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

In PHP8, match expressions are a new control structure that returns different results based on the value of the expression. 1) It is similar to a switch statement, but returns a value instead of an execution statement block. 2) The match expression is strictly compared (===), which improves security. 3) It avoids possible break omissions in switch statements and enhances the simplicity and readability of the code.

Yes, H5 page production is an important implementation method for front-end development, involving core technologies such as HTML, CSS and JavaScript. Developers build dynamic and powerful H5 pages by cleverly combining these technologies, such as using the <canvas> tag to draw graphics or using JavaScript to control interaction behavior.

In PHP, you can effectively prevent CSRF attacks by using unpredictable tokens. Specific methods include: 1. Generate and embed CSRF tokens in the form; 2. Verify the validity of the token when processing the request.

Strict types in PHP are enabled by adding declare(strict_types=1); at the top of the file. 1) It forces type checking of function parameters and return values to prevent implicit type conversion. 2) Using strict types can improve the reliability and predictability of the code, reduce bugs, and improve maintainability and readability.

The method of customizing resize symbols in CSS is unified with background colors. In daily development, we often encounter situations where we need to customize user interface details, such as adjusting...

In PHP, the final keyword is used to prevent classes from being inherited and methods being overwritten. 1) When marking the class as final, the class cannot be inherited. 2) When marking the method as final, the method cannot be rewritten by the subclass. Using final keywords ensures the stability and security of your code.

Composer is a dependency management tool for PHP. The core steps of using Composer include: 1) Declare dependencies in composer.json, such as "stripe/stripe-php":"^7.0"; 2) Run composerinstall to download and configure dependencies; 3) Manage versions and autoloads through composer.lock and autoload.php. Composer simplifies dependency management and improves project efficiency and maintainability.
