APC errors appear to be temporarily fixed by re-installing
[Tue Mar 1 15:18:37 2011] [apc-error] Cannot redeclare class zend_locale_math in /var/www/foo/library/Zend/Locale/Format.php on line 301.
Different parts of the web application break each time this happens, and it can be fixed by removing and re-installing php-apc and the site runs fine again until the next lot of source code is pushed to the server (I think).
Does anyone have any ideas as to what might be happening, and how I could fix this properly?
14 Replies
Bah, even erasing the cache using apc-info.php might be enough.
It has all signs of a bug in APC, and from time to time happens to me too, on Debian 5 (still). I'm not using Zend Framework, but it's the very same mixup of old and new versions of the file.
I'll have to look up the APC bug tracker and see if this is an issue.
Would I need to remove with aptitude, then install manually from PECL?
Also how are you running php? I've never seen this issue with apc.
@obs:
What's the value of your "fileupdateprotection" when you do phpinfo()?
This is set to 2.
@obs:
Also how are you running php? I've never seen this issue with apc.
It was installed with "apt-get install php5", as far as I'm aware, I haven't done anything to change the way in which it runs.
@obs:
Run phpinfo() and does it say cgi/fastcgi or apache2 handler?
Apache 2.0 Handler
root@wserv:~# apache2 -m | grep mpm
apache2: illegal option -- m
root@wserv:~# apache2 -M | grep mpm
apache2: bad user name ${APACHE_RUN_USER}
root@wserv:~# apache2 -l
Compiled in modules:
core.c
mod_log_config.c
mod_logio.c
prefork.c
http_core.c
mod_so.c
Try setting apc.stat to 0 in your php.ini, restart apache then see if the problem goes away.