Bug #71038 [Ana->Csd]: session_start() returns TRUE on failure

From: Date: Tue, 12 Jan 2016 11:48:19 +0000
Subject: Bug #71038 [Ana->Csd]: session_start() returns TRUE on failure
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198601@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71038&edit=1 ID: 71038 Updated by: yohgaki@php.net Reported by: pfenderd at bellsouth dot net Summary: session_start() returns TRUE on failure -Status: Analyzed +Status: Closed Type: Bug Package: Session related Operating System: Linux PHP Version: 5.6.16 Assigned To: yohgaki Block user comment: N Private report: N New Comment: Automatic comment on behalf of yohgaki Revision: http://git.php.net/?p=php-src.git;a=commit;h=a15e9ccba8a34553c029fb4574edba87c76447e5 Log: Fixed Bug #71038 session_start() returns TRUE on failure Previous Comments: ------------------------------------------------------------------------ [2015-12-16 01:18:04] yohgaki@php.net Return value of PHPAPI function is needed to be changed to fix this. The fix will only be applied to next minor version at best. i.e. 7.1 or later. ------------------------------------------------------------------------ [2015-12-10 12:44:03] yohgaki@php.net I have to change session internal functions (php_session_flush, php_session_save_current_state, etc) so that they return SUCCESS/FAILURE. These functions are static and may be changed in released versions. I'll modify these for 5.6/7.0. I have to look into save handler code more closely if I can change without compatibility issues. I guess I can since current save handler has stricter rules for return values. ------------------------------------------------------------------------ [2015-12-09 21:51:17] yohgaki@php.net Sure. ------------------------------------------------------------------------ [2015-12-09 14:53:03] laruence@php.net please have a look, it's a little weird s_open doesn't verify the path first.. ------------------------------------------------------------------------ [2015-12-05 15:27:20] pfenderd at bellsouth dot net Description: ------------ On a hosting server, the /tmp file system was mounted as read-only. The function session_start() returned TRUE on failure to open a session file. It should have returned FALSE. There is a Warning message issued by PHP but it should have been an ERROR message. Test script: --------------- session_start(); session_write_close(); Expected result: ---------------- session_start needs to return FALSE on failure to open a session. Actual result: -------------- Warning: session_start(): open(/tmp/sess_99c3aa0ceeec362b9de4ece520aeef64, O_RDWR) failed: Read-only file system (30) in /homepages/21/d361866886/htdocs/dayspeak_net/testlp.php on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /homepages/21/d361866886/htdocs/dayspeak_net/testlp.php:2) in /homepages/21/d361866886/htdocs/dayspeak_net/testlp.php on line 2 Warning: session_write_close(): open(/tmp/sess_99c3aa0ceeec362b9de4ece520aeef64, O_RDWR) failed: Read-only file system (30) in /homepages/21/d361866886/htdocs/dayspeak_net/testlp.php on line 3 Warning: session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in /homepages/21/d361866886/htdocs/dayspeak_net/testlp.php on line 3 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71038&edit=1

« previous php.bugs (#198601) next »