ID: 25876 Comment by: ron at dse dot nl Reported By: golden at riscom dot com Status: Closed Bug Type: Session related Operating System: freebsd 4.8 PHP Version: 4.3.3 New Comment:
Clearing the x-bit did not solve the problem. Probably this bug is not really related to the X-bit-hack but merely very similar in it's effects. The way to work around this bug is by avoiding php ini settings in all .htaccess files on your Apache server and instead put them in the application. For Drupal for instance, I moved these settings to conf.php by using ini_set() there. Squirrelmail even has a special config_local.php that you can use for this. More info on my particular setup: Apache 1.3.29 with o.a. mod_suexec and mod_rewrite PHP 4.3.8 (but same issue with 4.3.4) applications installed within same vhost Hope this will help developers find this annoying bug. Previous Comments: ------------------------------------------------------------------------ [2004-08-08 20:48:47] ron at dse dot nl Spent over a day troubleshooting as well. I think the real problem is described here: http://bugs.php.net/bug.php?id=25753 Although the suggested bug fix over there seems to have been incorporated in up to version 4.3.8, the behaviour still exists. The bug is easily triggered by running Squirrelmail and Drupal off the same Apache server as in my case. Drupal sets the session.save_handler to 'user' by a directive in the .htaccess file that comes with the installation. If, by accident, the next request by the same Apache child process is for a squirrelmail user, then the squirrelmail session_start() fails with 'Failed to initialize storage module'. This happens because the session.save_handler is still set to user instead of file, it is not reset to the master value for the child process. It is a matter of random luck which child process will serve the squirrelmail request so that explains the intermittent occurance. As mentioned by rasmus this "only happens on text/html files with the executable bit set". Clearing the bit for all of the squirrelmail PHP files seems to be useful a workaround. Just perform a find . -name '*.php' -type f -exec chmod -x {} ';' in your squirrelmail (or other PHP application) directory and restart your Apache server (for some reason this was necessary). ------------------------------------------------------------------------ [2004-08-08 01:01:54] mail at ferryvink dot nl Typo in the email address of my last post. ... ------------------------------------------------------------------------ [2004-08-08 01:00:42] mail at ferryviuk dot nl Got the "Failed to initialize session module" error as well. The session.save_handler reset to files worked when I also restarted the webserver! Seems logical but can easily be forgotten. Didn't see it in al these posts. Hell, I almost installed a new and fresh php4. hope it helps. Cheers FHV ------------------------------------------------------------------------ [2004-07-07 12:15:12] jenokz at yahoo dot com Hi, Im using php4.3.7 on FreeBSD 4.10-STABLE. The problem is session saved to /tmp but without values on it. I've try recompile it and im still get this problem, session not works. PS: /tmp is writeable and avaiable space on it. ------------------------------------------------------------------------ [2004-07-04 16:22:56] paulridge at ukwsd dot com We are experiencing this also on 4.3.3; RH9. tmp folder is chmod 777. Our php is compiled as follows: './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-mhash' '--with-ming=../ming-0.2a' '--enable-magic-quotes' '--with-mysql=/usr' '--enable-discard-path' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib' ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/25876 -- Edit this bug report at http://bugs.php.net/?id=25876&edit=1