#27963 [Com]: Default Session Values lost after explictly set for a given httpd process
ID: 27963 Comment by: Daniel dot Lindenberger at swivel dot net Reported By: joobri at sas dot com Status: Closed Bug Type: Session related Operating System: * PHP Version: 4CVS, 5CVS (2004-04-13) New Comment: On our system running 4.3.4, it seems to alternate between using "files" and "user", despite the fact that it's defined as "files" in php.ini, and is never set with session_module_name to "user". It was running fine for at least three months before the issue started last week, when we started testing uploading extremely large files through. We changed post_max_size and upload_max_filesize to 250M, though I don't know how this could effect it. We're only running around 10-20 apache processes at a time We receive the message: Fatal error: session_start(): Failed to initialize storage module. When it is set to "user". This may be fixed in subsequent versions, but was different enough from Joobri's description that I thought I would mention it. Previous Comments: [2004-06-15 15:05:01] datacompboy at mail dot ru Looks like problem still. Currently runned workaround via auto_prepend_file = /etc/httpd/phpinc.php and in /etc/httpd/phpinc.php [2004-04-13 14:25:03] [EMAIL PROTECTED] This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. [2004-04-12 10:37:46] joobri at sas dot com 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() [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() [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 this bug report at http://bugs.php.net/?id=27963&edit=1
#27963 [Com]: Default Session Values lost after explictly set for a given httpd process
ID: 27963 Comment by: datacompboy at mail dot ru Reported By: joobri at sas dot com Status: Closed Bug Type: Session related Operating System: * PHP Version: 4CVS, 5CVS (2004-04-13) New Comment: Looks like problem still. Currently runned workaround via auto_prepend_file = /etc/httpd/phpinc.php and in /etc/httpd/phpinc.php Previous Comments: [2004-04-13 14:25:03] [EMAIL PROTECTED] This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. [2004-04-12 10:37:46] joobri at sas dot com 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() [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() [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 this bug report at http://bugs.php.net/?id=27963&edit=1
#27963 [Com]: Default Session Values lost after explictly set for a given httpd process
ID: 27963 Comment by: edward dot costello at vialactia dot com Reported By: joobri at sas dot com Status: Open Bug Type: Session related Operating System: Linux PHP Version: 4.3.5 New Comment: The same problem occurs with session_set_cookie_params. Reproduce code: --- php.ini value of session.cookie_lifetime: 0 First request to this script will show 0 as the cookie life time. All subsequent requests (on the same httpd process) show 5. Expected result: According to the documentation of session_set_cookie_params, the changes should only last for the duration of the script. So the above example should show 0 every time. Actual result: -- The cookie parameters are changed for the life of the httpd process. Previous Comments: [2004-04-12 10:37:46] joobri at sas dot com 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() [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() [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 this bug report at http://bugs.php.net/?id=27963&edit=1