Ok, so I found a better solution - Zend Server has built-in Zend Optimizer +, which is 1.8 times faster than APC (320 req./s VS ~ 190 req./s or a regular ultrabook).
So, you just need to comment on the APC check in the Symfony2 configuration. Caching will still work.
To disable APC in Symfony2, do the following:
- Open the symfony2 requirements file:
/Symfony/app/SymfonyRequirements.php
AND REPLACE the following lines of code:
if (version_compare($installedPhpVersion, '5.4.0', '>=')) { $this->addRequirement( version_compare(phpversion('apc'), '3.1.13', '>='), 'APC version must be at least 3.1.13 when using PHP 5.4', 'Upgrade your <strong>APC</strong> extension (3.1.13+).' ); } else { $this->addRequirement( version_compare(phpversion('apc'), '3.0.17', '>='), 'APC version must be at least 3.0.17', 'Upgrade your <strong>APC</strong> extension (3.0.17+).' ); }
from
/* DISABLED FOR ZEND SERVER, USING ZEND OPTIMIZER+ INSTEAD if (version_compare($installedPhpVersion, '5.4.0', '>=')) { $this->addRequirement( version_compare(phpversion('apc'), '3.1.13', '>='), 'APC version must be at least 3.1.13 when using PHP 5.4', 'Upgrade your <strong>APC</strong> extension (3.1.13+).' ); } else { $this->addRequirement( version_compare(phpversion('apc'), '3.0.17', '>='), 'APC version must be at least 3.0.17', 'Upgrade your <strong>APC</strong> extension (3.0.17+).' ); } */
Source: http://phpcloud-symfony2.pen.io/
KestutisIT
source share