apc php cache

I found these instuctions;

http://nicolebluto.com/node/20

I installed php-apc;

aptitude install php-apc

Then I added these lines to php.ini;

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

apache 2 restart;

/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.

8 Replies

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.

On Ubuntu:

/etc/php5/conf.d/apc.ini
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 ;-)

@crimp-thanks for the input.

Can I safely assume the same code usage for Debian?

@chesty-thanks for the input.

I will give this a try later in the day and post my results.

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?

Did you delete the

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

php -a

in the command line and check for PHP startup errors.

@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:

I installed APC on Friday just gone. Am well impressed with the obvious drop in CPU usage…

![](" />

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct