• Enabling Alternative PHP Cache (APC) extension in Zend Server CE

    by  • May 20, 2010 • php, zend • 7 Comments

    I spent a little bit of time yesterday trying to code up a file progress bar for a project requiring large uploads. It seems the best (and the only?) way to do this in PHP is to use an extension called the Alternative PHP Cache, which amongst other things enables file upload status support and specfically enable a switch corresponding to RFC1867 support. I’m going to show you how I did this using the Zend Server CE PHP stack on a Windows Server 2003 x86 install.

    I originally thought that APC was statically compiled into Zend as it pops up in the list of extensions in the Zend dashboard:

    But, on closer inspection of phpinfo(), there was no reference to any apc directives at all.

    So here is how I did it:

    Enabling Alternative PHP Cache (APC) extension in Zend Server CE

    1. Download non-thread safe VC9 APC DLL (I went for php_apc-5.3-nts-svn20100226-vc9-x86.zip) from http://downloads.php.net/pierre/
    2. Unzip it and put the extension dll php_apc.dll into C:\Program Files\Zend\ZendServer\lib\phpext (assuming you left the Zend Server install location as its default)
    3. Add the following to your php.ini (in C:\Program Files\Zend\ZendServer\etc):
      ;Enable APC
      ;Enable upload progress bar
    4. Give Apache/PHP a restart

    Now check out phpinfo() on the Zend dashboard and you should see something like the following, with apc and the various directives being output in the configuration part of the output.

    Any of the APC file upload progress bar plugins (e.g. http://www.ibm.com/developerworks/library/os-php-v525/index.html) should now work.


    .NET developer at thetrainline.com, previously web developer at MRM Meteorite. Awarded a PhD in misbehaviour detection in wireless ad-hoc networks.A keen C# ASP.net developer bridging the gap with APIs and JavaScript frameworks, one web app at a time.


    7 Responses to Enabling Alternative PHP Cache (APC) extension in Zend Server CE

    1. Pingback: APC installeren op Zend Server CE « Webparking Weblog

    2. Frederick Sandalo
      June 20, 2011 at 9:01 am

      i cant seem to get this working with my Zend Server…. but i have been successfull when doing this with XAMPP, apc.php does run and i can see graphs, also in XAMPP’s phpinfo() i can see many details about APC…. but none of these when I’m doing it with my Zend Server CE version 4.0.6

    3. August 2, 2011 at 8:36 am

      Thank you, this helped a lot! After 2 hours of trying to install APC for ZendServer CE on Windows, your post gave the final hint.

    4. Bastian Carvajal
      February 23, 2012 at 12:54 am

      Thank you! I was looking to this for a while.
      Now I can get started developing with Symfony… 😀

    5. Markus
      October 14, 2012 at 2:03 pm

      Yes, really great to find this fast, saved me a lot of trouble! Had the same issue as Bastian when trying to give Symfony a try.

    6. Pingback: APC on Zend Server CE

    7. Pingback: How do I upgrade APC on Zend Community Server (needed for Symfony2)? - PHP Solutions - Developers Q & A

    Leave a Reply

    Your email address will not be published. Required fields are marked *