|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-03-31 09:02 UTC] spcmky at gmail dot com
[2009-03-31 18:18 UTC] shire@php.net
[2009-03-31 20:26 UTC] spcmky at gmail dot com
[2009-04-01 17:22 UTC] shire@php.net
[2009-04-06 15:54 UTC] spcmky at gmail dot com
[2009-04-06 16:06 UTC] shire@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 10:00:02 2025 UTC |
Description: ------------ In the error logs: [apc-error] Cannot redeclare class zend_cache_core Without APC enabled everything works properly. With APC version 3.0.19 everything works properly. With APC version 3.1.2 I get the above error. I'm using Zend Framework and have an initializer plugin that sets up all the configs, db connections, routes, etc. It is called via the bootstrap. In the Zend/Cache.php file on line 174, I found that if I test to see if the class exists before attempting to include the class file then the error goes away and all is well again. Reproduce code: --------------- This is the constructor function in the front controller plugin. I setup two caches but it errors at the first one. I am including all the classes I use in the file before the plugin class declaration public function __construct () { $this->_front = Zend_Controller_Front::getInstance(); // Init Local Cache $this->initCacheLocal(); } It will load the first time, after clearing apc, but never again due to the error. Expected result: ---------------- I expect that the require_once for the cache class in the initializer file would register with apc/php so that it wouldn't try to include it again. Actual result: -------------- [apc-error] Cannot redeclare class zend_cache_core