我正在尝试启动基于Zend的应用程序的本地副本,当我启动它时,我收到内部服务器错误(代码:500)。
根据Apache日志,未加载memcache
:
PHP Fatal error: Uncaught exception 'Zend_Cache_Exception' with message 'The memcache extension must be loaded for using this backend !' in
/Users/verse/Sites/tag/library/Zend/Cache.php:209
Stack trace:
#0 /Users/verse/Sites/tag/library/Zend/Cache/Backend/Memcached.php(123): >Zend_Cache::throwException('The memcache ex...')
#1 /Users/verse/Sites/tag/library/Zend/Cache.php(153): Zend_Cache_Backend_Memcached->__construct(Array)
#2 /Users/verse/Sites/tag/library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Memcached', Array, >false, false)
#3 /Users/verse/Sites/tag/index.php(72): Zend_Cache::factory('Core', 'Memcached', Array, Array)
#4 {main}
thrown in /Users/verse/Sites/tag/library/Zend/Cache.php on line 209
但我在php.ini
:extension="/usr/local/Cellar/php55-memcache/2.2.7/memcache.so"
此外,当我在终端中输入php -i | grep memcache
时,它表示启用了memcache
支持:
>
PHP Warning: Module 'memcache' already loaded in Unknown on line 0
Warning: Module 'memcache' already loaded in Unknown on line 0
Additional .ini files parsed => /usr/local/etc/php/5.5/conf.d/ext-memcache.ini,
/usr/local/etc/php/5.5/conf.d/ext-memcached.ini,
memcache
memcache support => enabled
memcache.allow_failover => 1 => 1
memcache.chunk_size => 8192 => 8192
memcache.default_port => 11211 => 11211
memcache.default_timeout_ms => 1000 => 1000
memcache.hash_function => crc32 => crc32
memcache.hash_strategy => standard => standard
memcache.max_failover_attempts => 20 => 20
memcached
memcached support => enabled
libmemcached version => 1.0.18
memcached.compression_factor => 1.3 => 1.3
memcached.compression_threshold => 2000 => 2000
memcached.compression_type => fastlz => fastlz
memcached.serializer => php => php
memcached.sess_binary => 0 => 0
memcached.sess_connect_timeout => 1000 => 1000
memcached.sess_consistent_hash => 0 => 0
memcached.sess_lock_wait => 150000 => 150000
memcached.sess_locking => 1 => 1
memcached.sess_number_of_replicas => 0 => 0
memcached.sess_prefix => memc.sess.key. => memc.sess.key.
memcached.sess_randomize_replica_read => 0 => 0
memcached.sess_remove_failed => 0 => 0
Registered save handlers => files user memcache memcached redis
但是,当我创建一个仅包含index.php
的虚拟<?php echo phpinfo(); ?>
并在浏览器中打开它时,结果页面没有提及memcache
。当我尝试打开我的Zend应用程序时,它仍然会抛出相同的错误。
有没有办法确保memcache
实际加载到服务器上?