[http://eaccelerator.net/ eAccelerator] is available in [http://aur.archlinux.org/packages.php?ID=30215 AUR]. When I was writing this page the latest version was 0.9.6.1 and installation was quite easy.

+

−

+

−

==Description==

+

eAccelerator is a free open-source PHP accelerator & optimizer. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.

eAccelerator is a free open-source PHP accelerator & optimizer. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.

==Installation==

==Installation==

−

Download the tarball from [http://aur.archlinux.org/packages.php?ID=30215 AUR] or use your favorite tool for AUR.

+

Download the tarball from {{AUR|eaccelerator}} or use your favorite tool for AUR.

IMPORTANT: If you are having problems with open_basedir, you need to edit the PKGBUILD, change the ./configure line to

IMPORTANT: If you are having problems with open_basedir, you need to edit the PKGBUILD, change the ./configure line to

./configure --without-eaccelerator-use-inode --prefix=/usr

./configure --without-eaccelerator-use-inode --prefix=/usr

I recommend that you do it anyway since future versions of eAccelerator won't be using inodes.

I recommend that you do it anyway since future versions of eAccelerator won't be using inodes.

−

You can fine more info here: http://eaccelerator.net/ticket/104#comment:13

+

You can find more info here: http://eaccelerator.net/ticket/104#comment:13

Compile the package with

Compile the package with

Line 18:

Line 14:

==Enable it in PHP==

==Enable it in PHP==

−

Run the following command as root (note: make sure you use >> in the following command.)

+

After the discussion here and the guidance by Spider.007 (also the maintainer of the AUR package) it is clear that you should do nothing special in order for eAccelerator to work.

−

cat /etc/php/conf.d/eaccelerator.ini >> /etc/php/php.ini

+

−

+

−

Edit /etc/php/php.ini and make the following changes:

+

−

* zlib.output_compression = On

+

−

* cgi.fix_pathinfo=1

+

−

* eaccelerator.cache_dir="/home/phpuser/eaccelerator/cache"

+

==Check if installation was ok==

==Check if installation was ok==

You can either from the command line or using phpinfo(). If the command line php binary uses the same configuration file as the php-fastcgi version and/or the mod_php version, you can check it by executing:

You can either from the command line or using phpinfo(). If the command line php binary uses the same configuration file as the php-fastcgi version and/or the mod_php version, you can check it by executing:

−

php -v

+

$ php -v

If installation was succesfull you should see something similar to the following:

If installation was succesfull you should see something similar to the following:

Then eAccelerator is loaded twice in your config files. This is happening because we appeneded eaccelerator.ini inside php.ini. To solve this problem edit /etc/php/conf.d/eaccelerator.ini and comment out the "extension=" line that loads eAccelerator. We have the same line inside our php.ini.

+

Then eAccelerator is loaded twice in your config files. Make sure you are not loading eAccelerator in both php.ini and its own config file. If you followed this wiki you shouldn't be having this problem.

−

The problem should also be solved by commenting the same line in php.ini or by not appending eaccelerator.ini in php.ini (I am not sure about the second one though, I haven't tested it).

+

If after upgrading php (through pacman) you get this

+

[eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.3.6. Rebuild it for your PHP version (5.3.8) or download precompiled binaries.

+

Then uninstall eAccelerator (I did a pacman -Rcsun eaccelerator), rebuild it from AUR and reinstall. Everything should be fine once again.

==Sources==

==Sources==

*[[Lighttpd_for_SSL_and_non-SSL#FastCGI_and_PHP_with_eAcceleration]] - helped me install eAccelerator and contains most of the above info and more.

*[[Lighttpd_for_SSL_and_non-SSL#FastCGI_and_PHP_with_eAcceleration]] - helped me install eAccelerator and contains most of the above info and more.

*[http://eaccelerator.net/wiki/Settings eAccelerator Wiki, Settings]

*[http://eaccelerator.net/wiki/Settings eAccelerator Wiki, Settings]

−

*[http://aur.archlinux.org/packages.php?ID=30215 AUR Package and open_basedir fix info by furibondox in the comments]

+

*[https://aur.archlinux.org/packages.php?ID=30215 AUR Package and open_basedir fix info by furibondox in the comments]

Revision as of 09:54, 20 October 2012

eAccelerator is a free open-source PHP accelerator & optimizer. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times.

Enable it in PHP

After the discussion here and the guidance by Spider.007 (also the maintainer of the AUR package) it is clear that you should do nothing special in order for eAccelerator to work.

Check if installation was ok

You can either from the command line or using phpinfo(). If the command line php binary uses the same configuration file as the php-fastcgi version and/or the mod_php version, you can check it by executing:

$ php -v

If installation was succesfull you should see something similar to the following:

This will show eAccelerator has been loaded successfully, but this doesn't necessarily show that eAccelerator is working like it should. Load a php script running on your webserver in your browser. Assuming you didn't disable the filecache with shm_only = 1, a cached script should appear in the cache directory.

You could/should also check using phpinfo(). To do so add:

<?php
phpinfo();
?>

to a file and open it with your browser. eAccelerator should have its own section.

Troubleshooting

Then eAccelerator is loaded twice in your config files. Make sure you are not loading eAccelerator in both php.ini and its own config file. If you followed this wiki you shouldn't be having this problem.

If after upgrading php (through pacman) you get this

[eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.3.6. Rebuild it for your PHP version (5.3.8) or download precompiled binaries.

Then uninstall eAccelerator (I did a pacman -Rcsun eaccelerator), rebuild it from AUR and reinstall. Everything should be fine once again.