ID:               28825
 Comment by:       arnor at netvistun dot is
 Reported By:      searchadm at goschorn dot de
 Status:           No Feedback
 Bug Type:         Session related
 Operating System: Suse Linux 8.2
 PHP Version:      4.3.7
 New Comment:

One more thing.

I've tried using a event program to trigger an event on each
modification in the session save directory (in my case /tmp2).

The program runs chmod, chgrp, chown to give anybody rights to do
anything (I know that's not wise, but I'm desperate) and a script that
deletes all files that are 0 bytes in size (i noticed there were a lot
of those).

This did not help at all!


Previous Comments:
------------------------------------------------------------------------

[2004-07-08 19:30:42] arnor at netvistun dot is

We (me and the company I work for) have also been having this problem
for the last month. This error appears randomly. We made a script to a
cronjob which is exicuted every minute. In a log of that script it
looks like this error appears in about 6% of ALL request. 

You can view this log at: http://www.netvistun.is/session_log/log.php

the script that can cause this error (and is requested each minute) is
at http://www.netvistun.is/session_log/index.php

php_info is at http://www.netvistun.is/session_log/info.php


The only thing you need to cause this error is:

<?php session_start() ?>

and that's it.

We have made owner/permission changes to the /tmp folder, we have tried
clearing the temp directory, we have tried changing the session save
directory to another dir. There is lots of space in the directory.
We've tried restarting apache every 24 hours, we have done all of the
workarounds which you see all over these bug tracks.

This bug has been appearing for a long time in the bugtrack (saw one
from php 4.1.x), and is always closed with some "workaround".

We've experienced this problem ever since php 4.3.1, up to 4.3.7.
We are currently running :
php 4.3.7
Apache 1.3.31
Linux dist.: Fedora
Control panel: WHM (cPanel)

php config:
'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml'
'--enable-bcmath' '--enable-calendar' '--with-curl' '--enable-exif'
'--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local'
'--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-imap'
'--with-imap-ssl' '--with-kerberos' '--enable-mbstring'
'--enable-mbstr-enc-trans' '--enable-mbregex'
'--with-ming=../ming-0.2a' '--enable-magic-quotes' '--with-mysql'
'--with-openssl' '--enable-discard-path' '--with-pear' '--enable-xslt'
'--with-xslt-sablot' '--enable-sockets' '--enable-track-vars'
'--enable-versioning' '--with-xmlrpc' '--with-zlib' 

Session Support  enabled  
Registered save handlers  files user  

Directive Local Value Master Value 
session.auto_start Off Off 
session.bug_compat_42 On On 
session.bug_compat_warn On On 
session.cache_expire 180 180 
session.cache_limiter nocache nocache 
session.cookie_domain no value no value 
session.cookie_lifetime 0 0 
session.cookie_path / / 
session.cookie_secure Off Off 
session.entropy_file no value no value 
session.entropy_length 0 0 
session.gc_divisor 100 100 
session.gc_maxlifetime 1440 1440 
session.gc_probability 1 1 
session.name PHPSESSID PHPSESSID 
session.referer_check no value no value 
session.save_handler files files 
session.save_path /tmp2 /tmp2 
session.serialize_handler php php 
session.use_cookies On On 
session.use_only_cookies Off Off 
session.use_trans_sid On On 


Any other info I can give, I will give gladly (except root passwords of
course :D)

I Hope I help.

------------------------------------------------------------------------

[2004-07-07 01:00:05] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

------------------------------------------------------------------------

[2004-06-29 18:07:35] [EMAIL PROTECTED]

When this error happens see if the directory where the 
sessions are being written to has enough space and if the 
system is not running out of file handles. 

------------------------------------------------------------------------

[2004-06-25 11:46:33] pgale at netvigator dot com

I am experiencing what appears to be the same problem.  99% of the time
users are able to login to my site and establish a session.  However,
about once a month, the login script fails and php sessions cannot be
established.  My ISP restarts apache and all works fine again. 

The ISP is running php4.2.3 on Linux 2.4.20-8smp#1 (as reported by
phpinfo()

I have now set up php errors to be emailed to me.  Once an error
message is caught I will add it to this bug report.  It could be some
time.

------------------------------------------------------------------------

[2004-06-18 11:06:26] searchadm at goschorn dot de

Description:
------------
php tells the following problem when i want to start new sessions

[17-Jun-2004 08:59:01] PHP Fatal error:  session_start(): Failed to
initialize storage module: user (path: /tmp) in
/www/mineralienatlas/htdocs/forum/index.php on line 109
[17-Jun-2004 08:59:03] PHP Fatal error:  session_start(): Failed to
initialize storage module: user (path: /tmp) in
/www/mineralienatlas/htdocs/forum/index.php on line 109
[17-Jun-2004 08:59:04] PHP Fatal error:  session_start(): Failed to
initialize storage module: user (path: /tmp) in
/www/mineralienatlas/htdocs/forum/index.php on line 109
------------------
here is the corresponding code
---- Start Code
if (empty($modSettings['enableCompressedOutput']))
        ob_start();

if (isset($_GET['PHPSESSID']) && preg_match('~[^A-Za-z0-9]~',
$_GET['PHPSESSID']) != 0)
        die('Hacking attempt...');

// Start the session.
session_start(); // line 109 <--------------

if (version_compare(PHP_VERSION, '4.2.0') == -1)
{
        $HTTP_SESSION_VARS['php_412_bugfix'] = true;

        // And, 4.2.x and above auto-seed ;).
        srand(time());
}
.......
---- End Code

it's not easy to reproduce the problem because the server has to run
several days to get the problem.
an "apachectl restart" solves the problem for some days again.

the /tmp has 777 right
there are only very few < 20 files in the directory when it crashes.

Part of my php.ini
---- Start
Session]
; Handler used to store/retrieve data.
session.save_handler = files
---- End

Saw some other threads here with the same problem but the threads are
closed so i open an new one. Think the solve code should already be in
4.3.7 and it didn't help or isn't it?

Regards Stefan

----------------------
Apache 2.0.48
----------------------

---- php compile settings start
config.nice         [----]  0 L:[  1+ 0   1/ 64] *(0   /1298b)= #  35
0x23
#! /bin/sh
#
# Created by configure

'./configure' \
'--prefix=/prog/php' \
'--with-_lib=lib' \
'--disable-debug' \
'--enable-bcmath' \
'--enable-calendar' \
'--enable-ctype' \
'--enable-dbase' \
'--enable-discard-path' \
'--enable-exif' \
'--enable-filepro' \
'--enable-force-cgi-redirect' \
'--enable-ftp' \
'--enable-gd-imgstrttf' \
'--enable-gd-native-ttf' \
'--enable-inline-optimization' \
'--enable-magic-quotes' \
'--enable-mbstr-enc-trans' \
'--enable-mbstring' \
'--enable-mbregex' \
'--enable-shmop' \
'--enable-sigchild' \
'--enable-sysvsem' \
'--enable-sysvshm' \
'--enable-track-vars' \
'--enable-trans-sid' \
'--enable-versioning' \
'--enable-wddx' \
'--with-bz2' \
'--with-dom=/usr/include/libxml2' \
'--with-ftp' \
'--with-gdbm' \
'--with-gettext' \
'--with-gmp' \
'--with-imap=yes' \
'--with-jpeg-dir=/usr' \
'--with-ldap=yes' \
'--with-mcal=/usr' \
'--with-mcrypt' \
'--with-mysql=/usr/local/mysql' \
'--with-ndbm' \
'--with-pgsql=/usr' \
'--with-png-dir=/usr' \
'--with-t1lib' \
'--with-tiff-dir=/usr' \
'--with-ttf' \
'--with-freetype-dir=yes' \
'--with-xml' \
'--with-xpm-dir=/usr/X11R6' \
'--with-zlib=yes' \
'--with-gd' \
'--with-openssl' \
'--with-curl' \
'--with-imap-ssl' \
'--with-iconv' \
'--with-mm' \
'--with-apxs2=/prog/apache/bin/apxs' \
'i686-pc-linux-gnu' \
"$@"
---- php compile settings end




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28825&edit=1

Reply via email to