Install APC (Alternative PHP Cache) in RHEL/CentOS 6/5 & Fedora 20-12

If you have any questions or problems regarding this article and want help within 24 Hours? Ask Now

Ravi Saive

Simple Word a Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

You may also like...

23 Responses

  1. Nella Tooms says:

    The article posted was very informative and useful. You people are doing a great job. Keep going.

  2. Ivan says:

    Thanks you ! Very easy and works like a charm !

  3. Cecilia Ryan says:

    Thank you Ravi or this tutorial very detailed and easy to follow can now sort out the caching problem on our new server.

  4. Guillermo says:

    Excellent thank you

  5. John says:

    Installed with no problems. Thanks

  6. Sami says:

    Thakns for this nice tutorial.
    APC is now installed but it seems not to work : the uptime value is always 0, so I think APC is not working ! How can I check if it really caches my magento site ?
    Regards :)

  7. Satya says:

    Hi ravi,

    I am having some problem with APC working properly. File cache always shows Hits = 1 and misses keep increasing, but at the same time, the cached file entries show some numbers in hundreds over some time.

    User cache entries shows to be working normally it seems.

    But almost twice a day i keep getting Internal server error and then have to restar php-fpm.

    I hv allocated 1024M memory and some other regular config stuff.

    If you have more idea, can i have your email ID to discuss this and send you more details about it.

    Warm rgds

  8. IPC Oye says:

    First, make sure you already have these things installed on your Centos:
    make, gcc, php-devel, php-pear.
    And then, type “pecl install uploadprogress”
    You should see something like this after the installation has finished:
    Build process completed successfully
    Installing ‘/usr/lib64/php/modules/’
    install ok: channel://

    Note that I’m using Centos 64 bit, if you’re using 32 bit, then the path will show
    Installing ‘/usr/lib/php/modules/’

    Then, use “vi /etc/php.ini” (or Nano, or VIM)
    Add this line on the bottom:
    Save and close, then restart your Apache by using service httpd restart
    Done ;)

  9. IPC Oye says:

    @Andre Luis de Andrade:
    APC works by storing the compiled bytecode of your PHP script on the memory, so next time when a request for the same page appears, APC will provide the cached code instead of re-read and recompile the code again from your disk, thus increasing the load speed.

  10. Hello!

    OK! APC is installed and I can view the Statistics.

    And now, how APC will cache my PHP sites?

    The APC is not creating /etc/apc.* files.

    The statistics is displaying NO PHP FILES cached.

    Thanks a lot. I want to understand how APC works.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Join Over 80000+ Linux Users
  1. 52882
  2. 2763
  3. 18,639

Enter your email to get latest Linux Howto's