Posts Tagged ‘eAccelerator’

Apache 2 not starting

Tuesday, March 22nd, 2011

After doing a apt-get upgrade your Apache does not start / does not serve connections? Read on!

somesystem.root# /etc/init.d/apache2 start
Starting web server: apache2[Tue Mar 22 18:18:02 2011]
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
failed!

Binding to adress 0.0.0.0:80 means accepting all connections. There is nothing wrong here, nor probably in the Apache setup files – which have been correct before.

The error can be caused by Apache 2 already running! Try ps awx to see all processes, look for Apache 2 and perhaps rotatelogs.

After killing the processes using kill -9 pid_one pid_two (replace pid_one pid_two with the appropriate process ids – you can specify multiple at once) try starting apache again (using apache2ctl -k start for instance).

This time Apache should start without problems. But it will not serve requests, and the Apache PID may not be written. (Thus, apache2ctl will assume that Apache is not yet running!)

Check your error log for the last entries. In my case the following entry was the key to fixing the problem:

PHP Warning: [eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.2.6-1+lenny3. Rebuild it for your PHP version (5.2.6-1+lenny10) or download precompiled binaries.

in Unknown on line 0
PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0

PHP's error was blocking the whole Apache! The quick solution for this particular problem (yours may be different) was to edit /etc/php5/apache2/php.ini and comment the lines setting up eAccelerator. (You need to use ";" as comment character for this file).

After the fix, killing the running Apache process(es), and starting Apache again, it resumed normal operation.

Concrete5 and eAccelaror

Tuesday, February 9th, 2010

As of v. 5.3.3.1 the experimental eAccelerator cache does not work for me. It yields:

[09-Feb-2010 14:07:34] PHP Fatal error: Call to undefined function eaccelerator_put() in /web/vhosts/0-idd-res/concrete5.3.3.1/concrete/libraries/cache/eaccelerator.php on line 60