标题: 是不是没有shm就用不了eaccelerator? [打印本页] 作者: wzhpro 时间: 2010-11-4 23:29 标题: 是不是没有shm就用不了eaccelerator? 是不是没有shm就用不了eaccelerator?
日志里提示
eAccelerator: shmmax should be at least 2MB
PHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0
PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0作者: 小夜 时间: 2010-11-4 23:30
你自已编译的?牛。我在litespeed下面,自已弄过。碰到过一个类似的错误,是因为我没有把缓存目录权限弄好。作者: wdlth 时间: 2010-11-4 23:30
请贴出php.ini的配置作者: wzhpro 时间: 2010-11-4 23:34
这个和配置没啥关系
我看了 官方的faq
I'm using linux 2.6 kernel and eAccelerator doesn't get loaded when the shm_size is set to value bigger than 32mb. Php gives this warning: PHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0
The default shared memory size for the 2.6 kernel is 32mb. You can change this size by setting /proc/sys/kernel/shmmax to the disired maximum value. You can do this by echo VAL > /proc/sys/kernel/shmmax or add the line kernel.shmmax=VAL to /etc/sysctl.conf so you don't have to set it manualy every time you reboot.
If you are using VPS solution, make sure the share memory and socket buffers in VPS configuration are sufficient. For OpenVZ or similar type, you can check them by cat /proc/user_beancounter. In normal case all the fail count (failcnt) should be zero. You would need to ask your VPS provider to enlarge the barrier and limit value if you encountered any fail count increase once failed loading eaccelerator.