#19022 [Bgs]: PHP Warning: Failed to write session data (files)

From: Date: Thu, 22 Aug 2002 11:10:48 +0000
Subject: #19022 [Bgs]: PHP Warning: Failed to write session data (files)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-17519@lists.php.net to get a copy of this message
 ID:               19022
 User updated by:  phpbugs@mx4k.com
 Reported By:      phpbugs@mx4k.com
 Status:           Bogus
 Bug Type:         Session related
 Operating System: linux (rh7.3), apache 1.3.26
-PHP Version:      4.2.1
+PHP Version:      4.2.2
 New Comment:

upgraded to 4.2.2 today .. still the same errors

my configure:

./configure \
--with-apache=../apache_1.3.26 \
--with-pgsql=/opt/postgresql-7.2.1

kernel is 2.4.7-10, register_globals=On


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

[2002-08-21 18:51:10] phpbugs@mx4k.com

sorry, no. (believe me i wouldnt post here if i could find any reasons
why my OS/Fs should screw up the files)

FYI I have tried LOTS of stuff but this problem persists.

[root@web1 root]# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hda5             49533868  19648360  27369332  42% /
/dev/hda1                23302      1348     20751   7% /boot
none                    514452         0    514452   0% /dev/shm
/dev/hda2              9288792     78404   8738480   1% /var


/tmp is in / and have 27gig free space, should be enough.

and as i said it doesnt lose all session data .. just a random (but too
high) portion.

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

[2002-08-21 13:33:19] sander@php.net

Maybe there's not enough space at /tmp.
Probably not a bug in PHP. 

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

[2002-08-21 11:14:17] phpbugs@mx4k.com

hi there,

i have a webserver running rh7.3 with apache 1.3.26 and php4.2.1 as
module. At random (not reproduceable reasons) all my session data gets
lost. the session file exists but all data written there in previous
scripts is gone.

All i get a hundreds of errors in my logfiles (like these):

[21-Aug-2002 16:47:07] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path
is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:47:13] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path
is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:48:29] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path
is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:48:51] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path
is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:49:49] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path
is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:50:04] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path
is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:50:19] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path
is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:52:02] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path
is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:52:11] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path
is
correct (/tmp) in Unknown on line 0

the webserver is at a very high load (70k users per day). problem is
that i need that session data but i cannot rely on them.

the session info in php.ini looks like this:

[snip]

[Session]
; Handler used to store/retrieve data.
session.save_handler = files

; Argument passed to save_handler.  In the case of files, this is the
path
; where data files are stored. Note: Windows users have to change this

; variable in order to use PHP's session functions.
session.save_path = /tmp

; Whether to use cookies.
session.use_cookies = 1

; Name of the session (used as cookie name).
session.name = reqid

; Initialize session on request startup.
session.auto_start = 1

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 604800

; The path for which the cookie is valid.
session.cookie_path = /

; The domain for which the cookie is valid.
session.cookie_domain =

; Handler used to serialize data.  php is the standard serializer of
PHP.
session.serialize_handler = php

; Percentual probability that the 'garbage collection' process is
started
; on every session initialization.
session.gc_probability = 1

; After this number of seconds, stored data will be seen as 'garbage'
and
; cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440

; Check HTTP Referer to invalidate externally stored URLs containing
ids.
session.referer_check =

; How many bytes to read from the file.
session.entropy_length = 0

; Specified here to create the session id.
session.entropy_file =

;session.entropy_length = 16

;session.entropy_file = /dev/urandom

; Set to {nocache,private,public} to determine HTTP caching aspects.
session.cache_limiter = nocache

; Document expires after n minutes.
session.cache_expire = 180

; use transient sid support if enabled by compiling with
--enable-trans-sid.
session.use_trans_sid = 0

url_rewriter.tags =
"a=href,area=href,frame=src,input=src,form=fakeentry"

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

[2002-08-21 11:09:16] phpbugs@mx4k.com

hi there,

i have a webserver running rh7.3 with apache 1.3.26 and php4.2.1 as
module. At random (not reproduceable reasons) all my session data gets
lost. the session file exists but all data written there in previous
scripts is gone.

All i get a hundreds of errors in my logfiles (like these):

[21-Aug-2002 16:47:07] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:47:13] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:48:29] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:48:51] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:49:49] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:50:04] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:50:19] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:52:02] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path is
correct (/tmp) in Unknown on line 0
[21-Aug-2002 16:52:11] PHP Warning:  Failed to write session data
(files). Please verify that the current setting of session.save_path is
correct (/tmp) in Unknown on line 0

the webserver is at a very high load (70k users per day). problem is
that i need that session data but i cannot rely on them.

the session info in php.ini looks like this:

[snip]

[Session]
; Handler used to store/retrieve data.
session.save_handler = files

; Argument passed to save_handler.  In the case of files, this is the
path
; where data files are stored. Note: Windows users have to change this

; variable in order to use PHP's session functions.
session.save_path = /tmp

; Whether to use cookies.
session.use_cookies = 1

; Name of the session (used as cookie name).
session.name = reqid

; Initialize session on request startup.
session.auto_start = 1

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 604800

; The path for which the cookie is valid.
session.cookie_path = /

; The domain for which the cookie is valid.
session.cookie_domain =

; Handler used to serialize data.  php is the standard serializer of
PHP.
session.serialize_handler = php

; Percentual probability that the 'garbage collection' process is
started
; on every session initialization.
session.gc_probability = 1

; After this number of seconds, stored data will be seen as 'garbage'
and
; cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440

; Check HTTP Referer to invalidate externally stored URLs containing
ids.
session.referer_check =

; How many bytes to read from the file.
session.entropy_length = 0

; Specified here to create the session id.
session.entropy_file =

;session.entropy_length = 16

;session.entropy_file = /dev/urandom

; Set to {nocache,private,public} to determine HTTP caching aspects.
session.cache_limiter = nocache

; Document expires after n minutes.
session.cache_expire = 180

; use transient sid support if enabled by compiling with
--enable-trans-sid.
session.use_trans_sid = 0

url_rewriter.tags =
"a=href,area=href,frame=src,input=src,form=fakeentry"


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


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



Thread (75 messages)

« previous php.bugs (#17519) next »