Apache crashes at startup when Zend Session Clustering is enabled

Follow

Applies To:

[ Zend Platform 2.x ]
[ Linux, Solaris ]

Symptom

In Zend Platform 2.x with Session Clustering enabled, Apache crashes on startup.

Technical Details

When Zend Session Clustering is installed and enabled (the session.save_handler is set to "cluster"), Apache will not start and crash, and no error message will probably be displayed. If Session Clustering is disabled (the ''session.save_handler'' in php.ini is not set to "cluster") things work as expected.

This problem only appears in some configurations of php, including but not limited to:

  • php on Solaris 5.9, in which php 5.0.x was compiled with sqlite
  • On Linux 32bit platforms where php is statically compiledinto Apache

It is possible for the problem to appear in other php configurations as well.

This problem is caused by a bug in php(both php4 and php5) related to the session save handlers registration mechanism.

Note about related issue:
If you comment out ''zend_extension_manager.mod_cluster'' line from php.ini but leave ''session.save_handler = cluster", PHP will crash, but this is a symptom of a totally different bug in php.

Resolution / Workaround

As of the release of Zend Platform 2.1, no stable version of PHP incorporates the fix for this bug.
Users of php4 up to version 4.4.0 and php5 up to 5.0.5 should apply a patch against php's source code and recompile php to solve the problem.

The patch can be downloaded here in the links below:

Patch for PHP 4

Patch for PHP 5

The patch should be app
lied on the file session.c in php's source tree. Here is an example on how to apply it:

$ cd {php-source-dir}/ext/session/
$ patch session.c {path_to_seesion-phpx.patch}

If the patch is applied well, you can compile and install php again, and if needed (when you use statically compiled php) recompile Apache as well.

This patch is most likely implemented in recent PHP versions.

 


Excerpt: Apache crash with Zend Session Clustering requres older PHP version patch.


Original Post Date: 2009-10-23 14:09:14

External Links:

Patch for PHP 4
Patch for PHP 5

Alternative Description:

Apache crash with Zend Session Clustering requres older PHP version patch

_____
Tags: apache,crash,Debian / Ubuntu,RedHat Enterprise Linux / CentOS,session clustering,SUSE Linux Enterprise Server / OpenSUSE,Zend Platform,oldKB

Have more questions? Submit a request

Comments

Powered by Zendesk