zl程序教程

您现在的位置是:首页 >  后端

当前栏目

php启动报错如何解决

PHP 如何 报错 解决 启动
2023-06-13 09:15:16 时间
复制代码代码如下:

[root@abclnmp]#servicephp-fpmstart
Startingphp-fpmeAccelerator:Couldnotallocate67108864bytes,themaximumsizethekernelallowsis33554432bytes.Lowertheamountofmemoryrequestorincreasethelimitin/proc/sys/kernel/shmmax.
[04-Dec-201319:06:44]NOTICE:PHPmessage:PHPWarning:[eAccelerator]CannotcreatesharedmemoryareainUnknownonline0
[04-Dec-201319:06:44]NOTICE:PHPmessage:PHPFatalerror:UnabletostarteAcceleratormoduleinUnknownonline0
failed

复制代码代码如下:

[root@abclnmp]#vi/etc/sysctl.conf
#KernelsysctlconfigurationfileforRedHatLinux
#
#Forbinaryvalues,0isdisabled,1isenabled.Seesysctl(8)and
#sysctl.conf(5)formoredetails.
#ControlsIPpacketforwarding
net.ipv4.ip_forward=0
#Controlssourcerouteverification
net.ipv4.conf.default.rp_filter=1
#Donotacceptsourcerouting
net.ipv4.conf.default.accept_source_route=0
#ControlstheSystemRequestdebuggingfunctionalityofthekernel
kernel.sysrq=0
#ControlswhethercoredumpswillappendthePIDtothecorefilename.
#Usefulfordebuggingmulti-threadedapplications.
kernel.core_uses_pid=1
#ControlstheuseofTCPsyncookies
net.ipv4.tcp_syncookies=1
#Disablenetfilteronbridges.
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=94500000915000000927000000
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=102465535
kernel.shmmax=128000000

加上最后一句话kernel.shmmax=128000000
然后应用sysctl-p
复制代码代码如下:
[root@abclnmp]#servicephp-fpmstart
Startingphp-fpmdone
[root@abclnmp]#/usr/bin/memcachedstart