`
xfcode
  • 浏览: 22497 次
  • 性别: Icon_minigender_1
  • 来自: 广州
最近访客 更多访客>>
社区版块
存档分类
最新评论

php 启动报错的解决办法

    博客分类:
  • php
 
阅读更多
php 启动时报错的情况,如下:
[root@abc lnmp]# service php-fpm start 
Starting php-fpm eAccelerator: Could not allocate 67108864 bytes, the maximum size the kernel allows is 33554432 bytes. Lower the amount of memory request or increase the limit in /proc/sys/kernel/shmmax. 
[04-Dec-2013 19:06:44] NOTICE: PHP message: PHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0 www.jbxue.com
[04-Dec-2013 19:06:44] NOTICE: PHP message: PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0 
failed 


解决方法:
[root@abc lnmp]# vi /etc/sysctl.conf 
# Kernel sysctl configuration file for Red Hat Linux 
# 
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and 
# sysctl.conf(5) for more details. 
# Controls IP packet forwarding 
net.ipv4.ip_forward = 0 
# Controls source route verification 
net.ipv4.conf.default.rp_filter = 1 
# Do not accept source routing 
net.ipv4.conf.default.accept_source_route = 0 
# Controls the System Request debugging functionality of the kernel 
kernel.sysrq = 0 
# Controls whether core dumps will append the PID to the core filename. 
# Useful for debugging multi-threaded applications. 
kernel.core_uses_pid = 1 
# Controls the use of TCP syncookies 
net.ipv4.tcp_syncookies = 1 
# Disable netfilter on bridges. 
net.bridge.bridge-nf-call-ip6tables = 0 
net.bridge.bridge-nf-call-iptables = 0 
net.bridge.bridge-nf-call-arptables = 0 
fs.file-max=65535 
net.ipv4.tcp_max_syn_backlog = 65536 
net.core.netdev_max_backlog = 32768 
net.core.somaxconn = 32768 
net.core.wmem_default = 8388608 
net.core.rmem_default = 8388608 
net.core.rmem_max = 16777216 
net.core.wmem_max = 16777216 
net.ipv4.tcp_timestamps = 0 
net.ipv4.tcp_synack_retries = 2 
net.ipv4.tcp_syn_retries = 2 
net.ipv4.tcp_tw_recycle = 1 
#net.ipv4.tcp_tw_len = 1 
net.ipv4.tcp_tw_reuse = 1 
net.ipv4.tcp_mem = 94500000 915000000 927000000 
net.ipv4.tcp_max_orphans = 3276800 
# TIME_OUT后等待时间 
#net.ipv4.tcp_fin_timeout = 30 
#net.ipv4.tcp_keepalive_time = 120 
net.ipv4.ip_local_port_range = 1024 65535 
kernel.shmmax = 128000000 


加上最后一句话 kernel.shmmax = 128000000
然后应用sysctl -p
[root@abc lnmp]# service php-fpm start 
Starting php-fpm done 
[root@abc lnmp]# /usr/bin/memcachedstart 
分享到:
评论

相关推荐

    Mac的MxSrvs切换php版本报错解决方案.docx

    Mac 的 MxSrvs 切换 php 版本报错解决方案 在这篇文章中,我们将讨论 Mac 的 MxSrvs 切换 php 版本报错解决方案。这篇文章将详细介绍如何解决 MxSrvs 软件切换 php 版本时出现的问题,并提供了详细的解决步骤。 ...

    php 启动时报错的简单解决方法

    php启动时报错的情况,想必很多朋友都有遇到吧,下面为大家介绍下比较不错的解决方法

    php 启动报错如何解决

    php 启动时报错的情况,想必很多朋友都有遇到过吧,下面是具体的解决方法

    PHP empty函数报错解决办法

    主要介绍了PHP empty函数在检测一个非变量情况下报错的解决办法,需要的朋友可以参考下

    php安装扩展mysqli的实现步骤及报错解决办法

    主要介绍了 php安装扩展mysqli的实现步骤及报错解决办法的相关资料,希望通过本文能帮助到大家,需要的朋友可以参考下

    wampserver2.5加安装报错解决包

    总之,解决WampServer 2.5安装报错的问题需要耐心和细心的排查,从系统环境、依赖库到软件冲突,每个环节都可能成为问题的关键。通过以上步骤,大部分问题都能迎刃而解,使开发者能够顺利搭建本地Web开发环境。

    php 8 下 phpexcel 报错处理

    本文将深入探讨如何解决在PHP 8中使用PHPExcel时可能出现的错误,并提供相关示例代码以供参考。 首先,PHPExcel库的一个常见问题是类名不兼容。在PHP 8中,类名必须以大写字母开头,而PHPExcel的某些类名并未遵循这...

    php curl 报错 php 导入整数 cacert.pem

    php curl 报错 php 导入整数 cacert.pem

    报错 No input file specified的解决办法

    你可以参考提供的资源,如 "No input file specified的解决方法-百度经验.url" 和 "报错 ”No input file specified.“ 排查 - zh_mead的博客 - CSDN博客.url",这些链接可能提供了更具体的步骤和案例。 在实际操作...

    Ubuntu下开启php调试模式报错信息解决办法

    Ubuntu下开启php调试模式报错信息解决办法 在Ubuntu下php的缺省设置是不显示错误信息的,如果程序出错会显示“无法处理此请求的错误提示”,这在开发环境下非常不方便。  其实我们只要编辑下apache的配置文件就好 ...

    apache启动不了的解决办法

    Apache 启动不了的解决办法 Apache 服务器是一种流行的 Web 服务器软件,然而,在实际应用中,Apache 服务器的启动问题是非常常见的。本文将总结 Apache 服务器无法启动的多种解决方法,以帮助解决各种启动问题。 ...

    PHP发送邮件失败解决方案,PHP发送邮件不成功解决办法

    本教程将针对"PHP发送邮件失败"这一主题,提供一系列可能的解决方案,并提供相关的源代码示例。 首先,我们需要了解PHP发送邮件的基本原理。PHP的`mail()`函数是内置的发送邮件功能,但其功能有限,通常不适用于...

    nginx上传文件大小报错500的解决办法

    主要介绍了nginx上传文件大小报错解决办法的相关资料,小文件可以提交,大文件会报500内部错误,这里提供解决办法,需要的朋友可以参考下

    WordPress 3.5 与 wpdb::prepare() 报错解决办法

    但是… WordPress 秉承一贯的作风, 也偷偷改了一些内部方法, 现在 wpdb::prepare() 必须填入第二个参数, 否则报错如下. Warning: Missing argument 2 for wpdb::prepare(), called in xxx.php on lin

    ecmall PHP5.5不报错

    标题“ecmall PHP5.5不报错”指的是在使用Ecmall电商平台系统时,在PHP 5.5环境下运行没有出现任何错误的情况。这通常意味着开发者已经成功地将Ecmall与PHP 5.5版本兼容,修复了可能出现的与旧版PHP不兼容的问题,...

Global site tag (gtag.js) - Google Analytics