【php报错开启】php报错FastCGI sent in stderr “PHP Fatal error: Allowed memory size of”错误

时间:2020-10-06  来源:Fast路由器  阅读:

PHP的memory_limit值的默认配置是128M,但是根据处理内容有时候会发生如下错误。

FastCGI sent in stderr: “PHP message: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 39858177 bytes)

可以通过修改memory_limit值来,回避以上错误的出现。

修改memory_limit值。

# vi /etc/php.ini
;memory_limit = 128M
memory_limit = 256M

修改php.ini文件之后,重启Apache或者Nginx。

# /etc/init.d/httpd restart  # 重启Apache
# /etc/init.d/nginx restart  # 重启Nginx

memory_limit = -1为,无限制。

/etc/php.ini里的默认配置如下。

; Maximum amount of memory a script may consume (128MB)
; http://www.php.net/manual/en/ini.core.php#ini.memory-limit
memory_limit = 128M

一个线程的最大内存使用量,即一个Web请求可使用的PHP内存量。

【php报错开启】php报错FastCGI sent in stderr “PHP Fatal error: Allowed memory size of”错误

http://m.bbyears.com/luyouqishezhi/103052.html

推荐访问:
相关阅读 猜你喜欢
本类排行 本类最新