php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62015 Session auto-start issues
Submitted: 2012-05-13 18:10 UTC Modified: 2013-08-10 10:20 UTC
From: drak@php.net Assigned: yohgaki (profile)
Status: Closed Package: Session related
PHP Version: 5.3.13 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: drak@php.net
New email:
PHP Version: OS:

 

 [2012-05-13 18:10 UTC] drak@php.net
Description:
------------
session.auto_start can currently be set in PHP_INI_ALL - however this is 
illogical and confusing.

When session.auto_start = 1, a session is started when PHP initialises according 
to the session.save_handler and session.save_path settings PHP starts up with. 
This makes it impossible to configure custom save handlers since PHP will have 
already started the session before userland code is executed.

Furthermore, this ini value can be modified at runtime, in PHP_INI_USER context 
which makes no sense, since if it was 1 at start-time, sessions will have already 
started; and if the it was 0 at start-time, sessions will only be started when 
session_start() is explicitly called - the setting is pointless at runtime. Thus 
the context in which session.auto_start can be set should change to at least 
PHP_INI_PERDIR.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-15 06:04 UTC] yohgaki@php.net
I think this is reasonable change, since it would not work as PHP_INI_ALL.
 [2012-05-15 06:04 UTC] yohgaki@php.net
-Assigned To: +Assigned To: yohgaki
 [2013-08-10 09:30 UTC] yohgaki@php.net
Automatic comment on behalf of yohgaki
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e9b128c1bfb64e50c5e361959a1a7ccd176d1324
Log: Fixed Bug #62015 Changed session.auto_start to PHP_INI_PERDIR. It is simply wrong and never worked if the value is changed at runtime
 [2013-08-10 09:30 UTC] yohgaki@php.net
-Status: Assigned +Status: Closed
 [2013-08-10 09:30 UTC] yohgaki@php.net
Automatic comment on behalf of yohgaki
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e9b128c1bfb64e50c5e361959a1a7ccd176d1324
Log: Fixed Bug #62015 Changed session.auto_start to PHP_INI_PERDIR. It is simply wrong and never worked if the value is changed at runtime
 [2013-08-10 09:30 UTC] yohgaki@php.net
Automatic comment on behalf of yohgaki
Revision: http://git.php.net/?p=php-src.git;a=commit;h=e9b128c1bfb64e50c5e361959a1a7ccd176d1324
Log: Fixed Bug #62015 Changed session.auto_start to PHP_INI_PERDIR. It is simply wrong and never worked if the value is changed at runtime
 [2013-08-10 09:39 UTC] drak@php.net
Sorry if I made a mistake looking at the commit, but it looks like this was only 
applied to the 5.4 tree. As it's a bug fix, it should also be applied to 5.3
 [2013-08-10 10:20 UTC] yohgaki@php.net
> As it's a bug fix, it should also be applied to 5.3

5.3 branch is security fix only now, so I cannot touch it.
 [2014-10-07 23:17 UTC] stas@php.net
Automatic comment on behalf of yohgaki
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=e9b128c1bfb64e50c5e361959a1a7ccd176d1324
Log: Fixed Bug #62015 Changed session.auto_start to PHP_INI_PERDIR. It is simply wrong and never worked if the value is changed at runtime
 [2014-10-07 23:28 UTC] stas@php.net
Automatic comment on behalf of yohgaki
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=e9b128c1bfb64e50c5e361959a1a7ccd176d1324
Log: Fixed Bug #62015 Changed session.auto_start to PHP_INI_PERDIR. It is simply wrong and never worked if the value is changed at runtime
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 18:01:28 2024 UTC