Want to have APC with PHP 5.5?

Today I was upgrading PHP on my production server. I went up to www.php.net and found that latest version released was PHP 5.5.1. As usual as our dev practice first thing was to look around if it had any already open bugs which affects my application. Found that JSON extension developed by Douglas Crockford was replaced with https://github.com/remicollet/pecl-json-c because of some license woes. As long as JSON works, it was not a problem (You can read more about it on http://philsturgeon.co.uk/blog/2013/08/fud-cracker-php-55-never-lost-json-support).

Another problem I came across was that APC was not supported in the latest version. I tired and tried compiling each version of APC with PHP 5.5.1 but no luck. Again I saw talks on some forums that APC will be always disabled for further PHP version and Zend optimizer+ can be used replacement to APC. Wait… I guess prople are confused here. If you are using APC for opcaching then Zend optimizer+, but if you are using APC for user caching then you can use Memcached or may be Redis is better choice.

But I was not convinced with any of these solutions. Then googling I came across Github repo of APC which works. But I’m still worried because it is still in development version, not stable and so not good to use on production.

Here comes APCu version 4.0.1, which is replacement of APC for user cache. APCu is fork of APC. It works perfectly fine. Right now its on my production. Hurray. Thanks to  Joe Watkins.

APCu doesn’t have opcache within it but user cache only. Leaving no option behind I had to go ahead with Zend optimizer+. Before going on production, I had done some benchmarking with and without Zend optimizer+ using http-perf and there was huge difference (good results). Moved it to production and as of now its serving well. I would update this page if I face any issues ahead.

Do let me know in comments  if you have any inputs / suggestions / different experiences.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.