Thursday Aug 12 '10

I freaked out a little this morning when I noticed that a key resource I had bookmarked was missing from the web well almost!  Thanks to Google's cache I dug up the instructions originally posted on urbanmainframe.com on how to install APC (for displaying realtime upload progress details next to the field uploading a file in Drupal for example) on a Mediatemple account. Et voila: Installing APC on Media Temple Grid Server

1. Telnet or SSH onto your GS server

2. mkdir /home/#####/data/lib (where “#####” is your Media Temple account number)

3. mkdir /home/#####/data/lib/php

4. wget http://pecl.php.net/... (at the time of writing this is the latest stable version - adjust as necessary)

5. tar zxvf APC-3.0.19.tgz (again adjust as necessary)

6. cd APC-3.0.19

7. phpize5

8. ./configure --enable-apc --enable-apc-mmap --with-apxs2=/usr/sbin/apxs --with-php-config=/usr/local/php-5.2.6-1/bin/php-config

9. make clean

10. make && cp modules/*.so /home/#####/data/lib/php

11. Finally add the following code to your php.ini file: extension_dir = /home/#####/data/lib/php/ extension = apc.so

That’s it. APC should now be installed and you should be able to measure a significant improvement in your PHP script performance.  

(Written by Qasim - Principal/Founder @ Design Guru)

Comments

Does this really work? I have it installed but it seems the apc.php file isn't showing any system cache entries (except apc.php).
We've used this method on at least 3 gridserver accounts - all with success. If you're having trouble I suggest posting a support ticket with Media Temple and referring back to this tutorial, perhaps someone over there can help you trouble shoot - please post a comment back if you get it sorted! Cheers. :)
Thanks for your great information. I really liked it.
Media Temple now uses PHP 5.2.14-1, not 5.2.6-1. So, shouldn't the configure line now read: ./configure --enable-apc --enable-apc-mmap --with-apxs2=/usr/sbin/apxs --with-php-config=/usr/local/php-5.2.14-1/bin/php-config
I called them but they couldn't help me. I really need to get this working. It appears it's almost working but it seems that the start time is always the time you load apc.php and uptime is always 0 minutes because of it. I haven't been able to figure it out.
See this article for how to figure out the right PHP version to use: http://wiki.mediatemple.net/w/GS:Install_PECL_extensions
There is a typo in my previous comment. The correct info for the php.ini file, assuming you follow the instructions above to create directories /home/#####/data/tmp is this: [xhprof] extension=xhprof.so xhprof.output_dir="/home/#####/data/tmp/xhprof"
Thanks for the great guide! This could work on a VPC or dedicated. I followed everything to come to the confusing that Media Temple's grid service isn't compatible with APC. Each page load refreshes the php.ini file + APC cache because it's installed on a cluster of servers.
they couldn't help me. I really need to get this working. It appears it's almost working but it seems that the start time is always the time you load apc.php and uptime is always 0 minutes because of it. I haven't been able to figure it out
I am using VPC... Glad to hear that this could work on it... Your comments tells the other problems I have to check..
they couldn't help me. I really need to get this working. It appears it's almost working but it seems that the start time is always the time you load apc.php and uptime is always 0 minutes because of it. I haven't been able to figure it out.
Hi, Just wanted to reiterate (having spent a couple of hours getting APC up and running) that IT DOES NOT PROVIDE ANY BENEFIT on mediatemple grid service accounts. Here's a response from mediatemple tech support: Due to the design of the (gs) Grid-Service, each visitor to your site is potentially accessing a different node with each site request. APC is not recommended on (gs) Grid-Service sites since each node in the grid would be have its own unique APC cache; basically, APC cannot function as normally expected when it is enabled on a (gs) Grid-Service site, and its use, while possible, will not offer any benefit, essentially for the reasons you seem to have found in your own research. So, excellent though this tutorial is, don't waste your time doing it. If you want APC, you'll need to shell out the extra $30 a month and get a DV 4 (which is excellent, by the way).
I agree with the entire comment above. Thanks for sharing nice information with us. i like your post and all you share with us is up todate and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job. Espresso Maker | Electric Scooters. | Stand Mixers | Slow Cooker
im very impressed of your blog i like it adria

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options