I've installed eaccelerator with my Linux VPS by referring to
However why is the value for "cached scripts" always 1? Dooes this mean that my site (http://scm.moodleace.com) is not caching the peages?
Check out this window of information on my Linux VPS' phpinfo():
Can anyone help me out here? I need to get my php files cached. At the moment, I suspect that although caching is enabled, caching is still not wotking. By now it should have cached MORE than I script.
I think the problem is that versions of eaccelerator after 0.9.5.3 dropped support for the PHP commands used by Moodle (and other PHP software like Wordpress etc). Using version 0.9.5.3 my system reports 232 cached scripts.
See the following release page for the eaccelerator 0.9.6 branch which states the "user cache functions have been removed"...
Dale - it works now. Thanks.
The steps I used:
yum install php-devel
yum groupinstall 'Development Tools'
ls -d */
Get the file.
tar xvfj eaccelerator-0.9.5.3.tar.bz2
Create the file /etc/php.d/eaccelerator.ini
Create /var/cache/eaccelerator ditrectory
mkdir -p /var/cache/eaccelerator
chmod 0777 /var/cache/eaccelerator
Dale, my PHP info shows cached scripts as 356. If I never added any other courses or php pages to my Moodle site, would that figure remain as 356? Or is it expected to increase as users login and use my Moodle site?
Great! Im glad it worked for you, as far as I can remember I was getting some errors in the error.log too. I have a Wordpress site on the same server which uses the W3 Total Cache plugin, but for some reason it just wouldnt work with eAccelerator. I found the solution in a comment at the Wordpress support forums and after a little investigation discovered this was also affecting Moodle.
With regards to the cached scripts figure, I have absolutely no idea. I presume as you use the site that figure would go up, although I cant explain why my cached scripts count is lower.
I've finally done it. I've found the Holy Grail of Php Servr optimisation. I have reached the end of my Quest, Gandlaf.
in my last post, I saw that eAccelerator had cached 365 pages. However, when I ran the control.php file, I didn't see pages listed as being cached. Hours later, I checked with my Web Host and they replied that eAccelerator doesn't work when Php is being run as cgi. So I surfed around and discovered that
"eAccelerator only works with mod_php or php in fastcgi mode. It can't be used in cgi or cli because eAccelerator needs to set up shared memory, and this can only be done when all php instances that need to access it are forks of the first process".
I then proceeded to go to my Plesk Control Panel and under "Website and Domains" tab and "Hosting Settings for domainname.com", I found what I was looking for. The option to change Php to run under fast-cgi. See attached gif:
And now I am as happy as a clam. See my additional screenshots and explanation on speeding up my Moodle site with eAccelerator at: http://moodle.org/mod/forum/discuss.php?d=165904
One happy clam
I'm having abit of a headache setting this up. I followed the recomendations by Frankie Kam found here:
When I look at my PHPinfo.php I see the cached scripts are bouncing not staying in the cache.
Ive set it up on my Dev server, when I use moodle I see the cached scripts increase to over 100, then collapse back to 45.
Any clues why?
Edit: they are now back to 1
I found installing APC is easy, on both Debian and CentOS.
P.S. Jonny, I noticed that you've submitted the three posts above within 3 minutes. You know that a post remain editable for 30 min. after submission?