I'm trying to configure APC to work with my Symfony 1.4/Doctrine 1.2 website. I'm currently using WAMP 2.1 and I installed the APC extension successfully. When I do a phpinfo(), I get a description showing that APC is enabled.
apc
APC Support enabled
Version 3.1.6
APC Debugging Disabled
MMAP Support Disabled
Locking type File Locks
Revision $Revision: 303642 $
Build Date Dec 1 2010 21:08:06
Directive Local Value Master Value
apc.cache_by_default On On
apc.canonicalize On On
apc.coredump_unmap Off Off
apc.enable_cli Off Off
apc.enabled On On
apc.file_md5 Off Off
apc.file_update_protection 2 2
apc.filters no value no value
apc.gc_ttl 3600 3600
apc.include_once_override Off Off
apc.lazy_classes Off Off
apc.lazy_functions Off Off
apc.max_file_size 10M 10M
apc.num_files_hint 1000 1000
apc.preload_path no value no value
apc.report_autofilter Off Off
apc.rfc1867 Off Off
apc.rfc1867_freq 0 0
apc.rfc1867_name APC_UPLOAD_PROGRESS APC_UPLOAD_PROGRESS
apc.rfc1867_prefix upload_ upload_
apc.rfc1867_ttl 3600 3600
apc.shm_segments 1 1
apc.shm_size 64M 64M
apc.slam_defense On On
apc.stat On On
apc.stat_ctime Off Off
apc.ttl 0 0
apc.use_request_time On On
apc.user_entries_hint 4096 4096
apc.user_ttl 0 0
apc.write_lock On On
However, I get an error saying APC extension isn't loaded when I try to set the query cache to use APC in the symfony ProjectConfiguration.class:
public function configureDoctrine(Doctrine_Manager $manager)
{
$manager->setAttribute(Doctrine_Core::ATTR_QUERY_CLASS, 'Doctrine_Query_Extra');
$manager->setAttribute(Doctrine_Core::ATTR_QUERY_CACHE, new Doctrine_Cache_Apc()); //use APC to query cache
}
Here's the error I get when running a clear cache (php symfony cc):
Fatal error: Uncaught exception 'Doctrine_Cache_Exception' with message 'The apc extension must be loaded for using this backend !' in C:..\lib\vend or\symfony-1.4.14\lib\plugins\sfDoctrinePlugin\lib\vendor\doctrine\Doctrine\Cach e\Apc.php:44
I've been googling everywhere and I can't seem to figure it out. I restarted WAMP to no avail. I'm thinking it might be an issue with the APC extension that I downloaded. I read that I had to use a VC6 compiled version for WAMPSERVER 2.1 so I did that. I found a binary labelled "php_apc_316_php53_vc6.dll". The fact that I can see that it's enabled in phpinfo() should mean it's installed properly right? Am I missing some symfony configuration prior to adding that line in ProjectConfiguration.class? On an aside, I have the exact same error when I try to use memcache as the query cache even though my memcache server is installed and running properly which leads me to believe I'm missing some sort of Symfony/Doctrine configuration step.
Any help would be much appreciated! Thanks! Frank