I have been seeing somewhat similar problems:
I took the two example scripts from the sessions page (page1.php,
page2.php) in the manual and cannot get them to work.
The second page does not show the supposedly registered variable.
I find the following in the apache error log:
<b>Warning</b>: write failed: Bad file descriptor (9) in <b>Unknown</b>
on line
<b>0</b><br>
<br>
<b>Warning</b>: Failed to write session data. Please check that the
current set
ting of session.save_path is correct (/phpsessions) in <b>Unknown</b> on
line <b
/phpsessions is owned (rwx) by www-data, which runs apache.
the php.ini file contains the following:
session.save_handler = files ; handler used to store/retrieve
data
session.save_path = /phpsessions ; argument passed to save_handler
; in the case of files, this is the
; path where data files are stored
session.use_cookies = 1 ; whether to use cookies
session.name = PHPSESSID ; name of the session
; is used as cookie name
session.auto_start = 0 ; initialize session on request
startup
session.cookie_lifetime = 0 ; lifetime in seconds of cookie
; or if 0, until browser is
restarted
session.cookie_path = / ; the path the cookie is valid for
session.cookie_domain = ; the domain the cookie is valid for
session.serialize_handler = php ; handler used to serialize data
; php is the standard serializer of
PHP
session.gc_probability = 1 ; procentual probability that the
; 'garbage collection' process is
started
; on every session initialization
session.gc_maxlifetime = 1440 ; after this number of seconds,
stored
; data will be seen as 'garbage' and
; cleaned up by the gc process
session.extern_referer_check = ;
session.entropy_file = ;
session.entropy_length = 0 ;
The version of PHP is 4.0.1pl2, Apache 1.3.12, Debian Linux 2.2.14
Session support was working until I upgrade to this release of PHP.
please help with suggestions!