Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: apc php cache
PostPosted: Tue Aug 10, 2010 1:50 am 
Offline
Senior Newbie

Joined: Sat Aug 07, 2010 3:42 pm
Posts: 6
Website: http://www.houghton.co
Location: Luxembourg
I found these instuctions;

http://nicolebluto.com/node/20

I installed php-apc;

Code:
aptitude install php-apc


Then I added these lines to php.ini;

Code:
 extension=apc.so
 apc.enabled=1
 apc.shm_size="64


apache 2 restart;

Code:
/etc/init.d/apache2 restart


However, after this was done, I was left with a blank page at my web address.
I had to remove php-apc and restart apache2 to restore my web site.
This was done very early morning :roll: so I probably have missed out a very simple step.
Any advice would be much appreciated.


Last edited by ancleessen4 on Tue Aug 10, 2010 2:02 am, edited 1 time in total.

Top
   
 Post subject:
PostPosted: Tue Aug 10, 2010 2:01 am 
Offline
Senior Member

Joined: Tue Feb 19, 2008 10:55 am
Posts: 164
there's a /etc/php5/conf.d/apc.ini used for configuring apc

also, there seems to be a quote mark that doesn't need to be there in apc.shm_size="64 no idea if that's causing the problem.

one last thing, there's /usr/share/doc/php-apc/apc.php.gz which you can copy to a virtual host and uncompress which gives you pretty graphs.


Top
   
 Post subject:
PostPosted: Tue Aug 10, 2010 2:04 am 
Offline
Senior Newbie

Joined: Sat Jul 17, 2010 1:32 pm
Posts: 7
On Ubuntu:

Code:
/etc/php5/conf.d/apc.ini


Code:
apc.shm_size=30


No quotes around values. You can install apc.php and check how much your site consumes. 30 might be enough.

Edit: What the above said ;-)


Top
   
 Post subject:
PostPosted: Tue Aug 10, 2010 2:12 am 
Offline
Senior Newbie

Joined: Sat Aug 07, 2010 3:42 pm
Posts: 6
Website: http://www.houghton.co
Location: Luxembourg
@crimp-thanks for the input.
Can I safely assume the same code usage for Debian?


Top
   
 Post subject:
PostPosted: Tue Aug 10, 2010 2:50 am 
Offline
Senior Newbie

Joined: Sat Aug 07, 2010 3:42 pm
Posts: 6
Website: http://www.houghton.co
Location: Luxembourg
@chesty-thanks for the input.
I will give this a try later in the day and post my results.


Top
   
 Post subject:
PostPosted: Tue Aug 10, 2010 8:36 am 
Offline
Senior Newbie

Joined: Sat Aug 07, 2010 3:42 pm
Posts: 6
Website: http://www.houghton.co
Location: Luxembourg
Sorry guys-followed these instructions and still getting plain white pages served.
I removed php-apc again and re-started apache 2 and website is back to normal.

Note: I have cleared browser cache and I do not have wp-cache installed.

Any ideas?


Top
   
 Post subject:
PostPosted: Tue Aug 10, 2010 2:00 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
Did you delete the
Code:
extension=apc.so

line in /etc/php5/apache2/php.ini ? You're not suppposed to add extension entries manually if you use aptitude to install them.

Check your Apache error log for any hints. Also, if you have the php5-cli package installed, you can type
Code:
php -a

in the command line and check for PHP startup errors.


Top
   
 Post subject:
PostPosted: Tue Aug 10, 2010 3:10 pm 
Offline
Senior Newbie

Joined: Sat Aug 07, 2010 3:42 pm
Posts: 6
Website: http://www.houghton.co
Location: Luxembourg
@hybinet-thanks for the input.
Yes, apc.co was removed from php.ini.
I will look further into this in coming days, apache error log and php-cli.
Busy constructing the site at the moment :wink:


Top
   
 Post subject:
PostPosted: Mon Aug 16, 2010 6:11 am 
Offline
Senior Newbie

Joined: Thu Mar 11, 2010 10:42 am
Posts: 15
ICQ: 33922655
Location: Ireland
I installed APC on Friday just gone. Am well impressed with the obvious drop in CPU usage...

Image

_________________
Linode 512 @ cbr250.com


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group