stmllr.net

No eAccelerator package for Debian Etch?

by on stmllr.net

Two years after the release of "Sarge", we face the next Debian release called "Etch". Finally, Debian ships PHP 5, MySQL 5, Apache 2.2, ... but still NO eAccelerator package. No need to worry, you'll always find a package somewhere in the web...

Etch includes more than 18000 packages - why is eAccelerator missing? Well, the licence of eAccelerator somehow seems not to be compatible with the Debian policy. I did not really find out why, but found an "old news" about failed negotiations between the developers of eAccelerator and "Mr. Turck", who "owns" parts of the copyright (eAccelerator is a fork of Turck MMcache).

Fortunately, Andrew McMillan provides a fresh eAccelerator package for Etch. There have been some questions on the TYPO3-Debian mailing list about installing third party packages on Debian Linux. To clearify things, here comes a quick installation guide.

You need to import Andrews public key, because Etch now comes with signed packages and apt-get could complain about unverified signatures of 3rd party software.

gpg --keyserver pgp.mit.edu --recv-keys 8F068012
gpg --armor --export 8F068012  | apt-key add -

Ok. Now add the repository to your apt sources.

echo 'deb http://debian.mcmillan.net.nz/debian etch awm' \
>> /etc/apt/sources.list

Update your list of packages and install the eAccelerator module.

aptitude update 
aptitude install php5-eaccelerator

You need to activate the module in /etc/php5/{cgi|apache|apache2}/conf.d/eaccelerator.ini by uncommenting the last line:

extension=eaccelerator.so 

If you use PHP5 via FastCGI/fcgid and Apache2 worker, it is recommended to use eAccelerator as an extension of the Zend engine. Replace the above line with:

zend_extension="/usr/lib/php5/20060613+lfs/eaccelerator.so" 

Finally, reload Apache

/etc/init.d/apache2 force-reload 

Use phpinfo() to check if eAccelerator is activated. Note that php-cli is not supported by eAccelerator.

<?php phpinfo(); ?>

Tags

Comments

  1. Peter

    Nice article. Tried it with LigHTTPD and FastCGI. Works like a charm.

    Thank you!!!

  2. Michael

    Andrew has just updated to the newest Etch PHP version, but it took some time (and apparently the PHP updates are not binary compatible). So instead of waiting, you can just build the packages with deb-src, which has worked perfectly for me on AMD64.

    http://andrew.mcmillan.net.nz/node/70#comment-266

  3. Alex

    Thanks for the nice howto.

    There is a little bug where it says to add the repository to sources.list, there is a http:// missing. Without that, apt-get update will complain.

  4. Steffen

    One hint about unit tests and TYPO3:

    eAccelerator can strip comments, like @test. But these comments are mandatory for some unit tests to work (like those in Extbase of TYPO3: http://bugs.typo3.org/view.php?id=12347)

    To make sure that unit tests work properly, you have to build eAccelerator with the option:

    --with-eaccelerator-doc-comment-inclusion