APC Installation Trouble

software development

#1

Hi Dreamhosters,

Let me briefly preface by saying I have limited background in server side web administration, so please forgive me if my terminology is inaccurate, or my question is poorly formed. I am attempting to add APC for my current PHP 5.3 installation, and could use some further guidance.

I have carefully read http://wiki.dreamhost.com/Pecl_APC and http://wiki.dreamhost.com/PHP.ini, which seem to clearly explain the process necessary for installing APC…however… when running apcinstall.sh the script errors out on line 196 when attempting to run phpize:

My first thought is that this is searching for files which would only be present if I had a full custom PHP install in my home directory. Advice I had seen on the PHP.ini page, as well as in some other threads on this forum seemed to indicate that for PHP5.3, this is no longer necessary even to install the APC extension.

If someone who possesses more technical expertise could help me diagnose this problem so I can get APC up and running I would be extremely grateful.

Please let me know if there is any further info I can provide to help troubleshoot this situation.

Thanks,
Andrew

PS. As a further note, the following two blogs suggest an alternative approach which looks appropriate for using the stock DreamHost PHP5.3 install and simply adding the extension in phprc…sounds promising, but I’m not well informed enough to know if this is a good approach.

http://www.bookerthedog.com/2012/02/installing-apc-for-php-on-dreamhost/
http://blog.hackingthevalley.com/2012/11/07/wordpress-tuneup-php-apc-and-wp-super-cache/


#2

OK, I have an update. I used the method outlined in the blog posts mentioned above…and it LOOKS like I have APC installed and enabled, but it only stays running for 20-30 seconds at a time.

While APC is up and running, my phpinfo() displays all the relevant APC sections and everything looks good…however, I’m getting loads of Require_once(): Unable To Allocate Memory For Pool Error. Do I need to change my APC memory settings in phprc to feed APC more memory?


#3

What you’re seeing is, unfortunately, correct. The APC cache is private to each PHP process, and those don’t persist for more than 30 seconds or so of idle time. This is one of the primary reasons why we don’t have an option to enable PHP caching on shared hosting.


#4

I’m on VPS hosting. I increased the available memory settings in the phprc and it seems to be running exceptionally smoothly now!

You can check out the status page here: http://tamrielfoundry.com/apc.php

I’m really impressed with the performance boost I’m getting when I leverage APC with W3 Total Cache. Seems to be working great, hopefully I haven’t set myself up for any serious pitfalls with my configuration settings…but, so far so good!


#5

Glad to see you got it working!
I was paying almost $80/month to keep up with ram hogging sites that used too much ram and ran inefficiently on my VPS.

I got W3TC tweaked, but it’s impossible for me to figure out either APC or XCache. I’ve tried everything. I’ve spend probably around 40+ trying to do a custom php install, edit php.ini, and hack through these outdated DH wiki articles. Nothing works…

Anyone know where to find a guide or script to actually get APC or XCache working on either php5.3 or even php5.4?
At this point, I’d gladly pay someone to do the install for me – I realize that DH support won’t touch this or help me out, but they have said they’re thinking about XCache for 5.3 domains. [color=#FF6347]I can’t wait, so I’ll pay now…
[/color]

any help for guides or installation would be greatly appreciated!


#6

Yeah, I’ll do it.