安装并启用APC 3.1.9(备用
PHP缓存)后,使用pecl,我遇到了内部服务器错误.我检查了我的错误日志,这就是显示的内容.
错误日志:
PHP Fatal error: PHP Startup: apc_mmap: mkstemp on /tmp/apc.efdb4d Failed: in Unknown on line 0 [Wed Jul 06 23:47:41 2011] [error] mod_fcgid: process /var/www/cgi-bin/cgi_wrapper/cgi_wrapper(22397) exit(communication error),get unexpected signal 11
我没有在我的PHP.ini文件中添加APC扩展,而是在/etc/PHP.d/中创建了一个apc.ini文件,这是我当前的APC配置
apc.ini配置:
; /etc/PHP.d/apc.ini extension = apc.so apc.enabled = 1 apc.shm_segments = 1 apc.shm_size = 128M apc.optimization = 0 apc.num_files_hint = 4096 apc.ttl = 7200 apc.user_ttl = 7200 apc.gc_ttl = 0 apc.cache_by_default = 1 apc.filters = "" apc.mmap_file_mask = "/tmp/apc.XXXXXX" apc.slam_defense = 0 apc.file_update_protection = 2 apc.enable_cli = 0 apc.max_file_size = 10M apc.stat = 1 apc.write_lock = 1 apc.report_autofilter = 0 apc.include_once_override = 0 ;apc.rfc1867 = 0 ;apc.rfc1867_prefix = "upload_" ;apc.rfc1867_name = "APC_UPLOAD_PROGRESS" ;apc.rfc1867_freq = 0 apc.localcache = 0 apc.localcache.size = 512 apc.coredump_unmap = 0 apc.stat_ctime = 0
即使在禁用APC后,我在尝试登录Plesk CP时遇到了另一个错误:
ERROR: Zend_Db_Statement_Exception sqlSTATE[HY000]: General error: 1 Can't create/write to file '/tmp/#sql_6d7_0.MYI' (Errcode: 13)
我通过Plesk的Power Panel重新启动我的容器来解决上述问题.我认为必须将/ tmp更改为exec使用mount -o remount,exec / tmp通过pecl解决APC安装过程中的权限错误.安装完成后,我将/ tmp返回noexec.这些步骤的要点可以在here找到.
我目前正在运行:
> CentOS 5.6
> PHP 5.3.5
> FastCGI
>已安装APC 3.1.9
我不知道如何解决这个问题.是因为我使用最新版本的APC?还是apc.ini配置?在我启用apc扩展的位置是否重要?即/etc/PHP.ini与/etc/PHP.d/apc.ini
FastCGI和APC兼容性问题怎么样?
任何帮助或建议将不胜感激.