|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-02-28 12:34 UTC] krakjoe@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: krakjoe
[2014-02-28 12:34 UTC] krakjoe@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 04:00:01 2025 UTC |
Description: ------------ I'm getting a 'cannot redeclare class' error on an otherwise working class extension in APC 2.0.4. It seems this is an issue that should have been resolved with the current release, but I'm certain I'm running the current version. I recently installed the APC 2.0.4 FreeBSD port from the current 4.10 RELEASE. When I do #pear list I see that I'm really running APC version 2.0.4. I'm using Smarty, and extending the class to add some of my own functionality. When I turn on APC in php.ini, I get the following error: Fatal error: Cannot redeclare class smarty:smarty_tod in /usr/local/share/tod/smarty/Tod.Smarty.class.php on line 4 When I disable APC, I get normal behavior. It may or may not be important that the extended class is in a separate directory in the include_path. My humble apologies if this is not really a bug. I checked the pecl-dev and pecl-cvs lists extensively, as well as all the other resources I could come up with. Thanks for your time. Reproduce code: --------------- <? require('Smarty.class.php'); class Smarty_tod extends Smarty { function Smarty_tod() { global $lan_common; $this->assign_by_ref('lan_common', $lan_common); } } ?> Expected result: ---------------- APC should make my application run much faster. Actual result: -------------- Fatal error: Cannot redeclare class smarty:smarty_tod in /usr/local/share/tod/smarty/Tod.Smarty.class.php on line 4