From:             joobri at sas dot com
Operating system: Linux
PHP version:      4.3.5
PHP Bug Type:     Session related
Bug description:  Default Session Values lost after explictly set for a given httpd 
process

Description:
------------
When PHP code is run that explicitly sets (and overrides) the default
value of session_module_name, subsequent requests to that httpd process
use the value that was set and do not default back to the default value. 
This causes intermittant problems on our web server running 300 httpd
processes - some apache processes have the default value and some have a
different value if they were set by code run on that process.





In the cases where it fails, the session module name

is not the configured default of "files" but is "user" instead.  It looks
like

in some circumstances an alternate session module is "left-over" from a
previous

request.  (I've seen similar "left-overs" with other configuration
directives,

notably error log level, in the past.)



The work-around we are using: add an explicit

session_module_name("files");

before calling any other session-related functions.



 

The following 2 errors are in the log:



/nfs/swwprod2/local/etc/httpd.dir/logs/error_log:[Thu Apr  8 09:23:18
2004]

[error] PHP Fatal error:  session_start() [<a

href='/sww/mirrors/php/function.session-start.html'>function.session-start.html<

]:

Failed to initialize storage module: user (path: /tmp) in

/remote/tappan/vol/vol4/tools/testhelp/websrc/existing.php on line 3

/nfs/swwprod2/local/etc/httpd.dir/logs/error_log:[Thu Apr  8 09:23:33
2004]

[error] PHP Fatal error:  session_start() [<a

href='/sww/mirrors/php/function.session-start.html'>function.session-start.html<

]:

Failed to initialize storage module: user (path: /tmp) in

/remote/tappan/vol/vol4/tools/testhelp/websrc/existing.php on line 3



Reproduce code:
---------------
Default Value: session_module_name("files");



In your code, specify session_module_name("user");



Set your apache server to run with only one httpd process - run your code
setting session_module_name to user.



Subsequent requests by a page not setting the session_module_name value
will have the session_module_name set to user and not default back to
files.

Expected result:
----------------
When you don't specify session_module_name it should set back to the
default value.

Actual result:
--------------
session_module_name retains the last value set, not the default value.

-- 
Edit bug report at http://bugs.php.net/?id=27963&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=27963&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=27963&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=27963&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=27963&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=27963&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=27963&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=27963&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=27963&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=27963&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=27963&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=27963&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=27963&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27963&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=27963&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=27963&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=27963&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=27963&r=float

Reply via email to