Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I can't clear the cache in eAccelerator. I have deleted all files from the directory /var/cache/php-eaccelerator/* with the following command:

rm -rf /var/cache/php-eaccelerator/*

But this does not help. I use CentOs OS.

How can I clear the cache?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

In case you still have the sources from compiling eAccelerator, check for the controlpanel script config.php inside the source folder. Make it accessible over your website (protect it from being accessed by anyone with some AuthBasic mechanism or allow from IP.

Edit the file with your favourite editor and change $user and $pw on top of the file. After that, fire it up and you should be able to clean the cache as you want. Think there are some more things you can manipulate with this as well.

share|improve this answer
1  
If you installed eAccelerator from EPEL (likely as you're on CentOS and it's not in the core distribution) then the control script can be found in: /usr/share/doc/php-eaccelerator-0.9.6.1/control.php –  James Yale Dec 14 '11 at 9:54

You can delete/clear/flush eAccelerator cache this way:

First login in the server as root via SSH (using Putty or any SSH client).

By default this is eAccelerator cache directory /tmp/eaccelerator, so use this command to delete all cache older than 24 hours.

tmpwatch --mtime --all 24 /tmp/eaccelerator

Sometimes the eAccelerator cache directory can be different such as /var/cache/eaccelerator, then just use the correct directory when typing the command:

tmpwatch --mtime --all 24 /var/cache/eaccelerator

If you wish you can create a cronjob with this command to execute automatically every day/week/...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.