1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP Caching : APC Installation and Configuration Tutorial

Discussion in 'Site & Server Administration' started by agnivo007, Jun 2, 2007.

  1. #1
    Caching php scripts (intermediate opcode) in memory can make your dynamic pages load really fast and exert less load on the CPU of your VPS/dedicated server.

    Typical php caching engines and accelerators are eAccelerator, xCache and APC (a PECL extension). APC is considered the best.

    In this do-it-yourself tutorial, I've written about APC and easy step by step procedure to get it installed on your VPS/dedicated server.

    Here's the complete tutorial : Cache PHP Scripts With APC PECL Module

    So, try it out today; lessen system load and watch your dynamic pages fly!

    Feel free to submit comments and social bookmark the blog post...many people may be helped with this.

    Thank you.
     
    agnivo007, Jun 2, 2007 IP
    inworx likes this.
  2. ndreamer

    ndreamer Guest

    Messages:
    339
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i just installed this last night which took forever as it could not find my apxs, for anybody using centos or another os with the same problem try creating a link to where your apx binarys are located heres what i used.

    ln -s /usr/bin/apxs2 /usr/bin/apxs
    Code (markup):
    note that you will need to change this depending on where your apx binary is, alternatively you could install from source.
     
    ndreamer, Jun 2, 2007 IP
  3. agnivo007

    agnivo007 Peon

    Messages:
    4,290
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well, for apache2 you need to use apxs2, apache1 users can go on with apxs.
    I think one can also mention the path to apxs if you get errors involving apxs :

    pecl install apc --with-apxs = [your path to apxs]

    Doing a yum install httpd-devel installs necessary files (apxs) if not installed already.
     
    agnivo007, Jun 3, 2007 IP
  4. inworx

    inworx Peon

    Messages:
    4,860
    Likes Received:
    201
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Nice tut mate!

    Rep added! I will post some tuts as well here:D
     
    inworx, Jun 3, 2007 IP
    agnivo007 likes this.
  5. agnivo007

    agnivo007 Peon

    Messages:
    4,290
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yea...I see many people in this forum asking basic questions...tutorials should help them and all.
     
    agnivo007, Jun 3, 2007 IP
  6. zonzon

    zonzon Peon

    Messages:
    100
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hello, I never tried APC, I'm using eAccelerator and it works very well with my sites. A simple bench with apache bench (AB) showed me an significant increse.

    But, what are the main differences between eAccelerator and APC?

    tks
     
    zonzon, Jun 3, 2007 IP
  7. agnivo007

    agnivo007 Peon

    Messages:
    4,290
    Likes Received:
    289
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Apparently, eAccelerator isn't actively maintained now while APC is actively maintained by some PHP development team members. APC is more resource efficient as considered by people...it'll also be included in PHP6.

    I'll try to post some architectural differences between the 2 packages later if I find some time.
     
    agnivo007, Jun 3, 2007 IP