1

I keep getting a certain APC error after moving my websites from one server to another. I've checked if the APC module has been installed on the new one (both regular and cli are) and all settings seem ok (apc.so loaded, permissions ok, phpinfo says it's installed, see below for the php.ini settings). Yet I keep getting the following error:

Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to use ApcUniversalClassLoader as APC is not enabled.' in /home/xxx/vendor/symfony/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php:77 
Stack trace: 
#0 /home/xxx/app/autoload.php(6): Symfony\Component\ClassLoader\ApcUniversalClassLoader->__construct('sf2csg')
#1 /home/xxx/app/bootstrap.php.cache(3): require_once('/home/xxx/...') 
#2 /home/xxx/public_html/app.php(3): require_once('/home/xxx/...') 
#3 {main} thrown in /home/xxx/vendor/symfony/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php on line 77

My APC settings:

[APC]
;specifies the size for each shared memory segment 8MB to start
apc.shm_size=8M
;max amount of memory a script can occupy
apc.max_file_size=1M
apc.ttl=0
apc.gc_ttl=3600
; means we are always atomically editing the files
apc.file_update_protection=0
apc.enabled=1
apc.enable_cli=1
apc.cache_by_default=1
apc.include_once_override=0
apc.localcache=0
apc.localcache.size=512
apc.num_files_hint=1000
apc.report_autofilter=0
apc.rfc1867=0
apc.slam_defense=0
apc.stat=1
apc.stat_ctime=0
apc.ttl=7200
apc.user_entries_hint=4096
apc.user_ttl=7200
apc.write_lock=1

Any help would be greatly appreciated as a few hours of googling the issue seems to not give me any more info than I already have. Any takers? :-)

Thanks, guys!

C.

1
  • Never mind. I found out what the problem was: the website was being served on another server with an rsync copy being pulled to the one with APC.
    – sn0r
    Dec 19, 2012 at 11:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.