From:             gandalf at flock dot com
Operating system: All
PHP version:      5.0.5
PHP Bug Type:     Session related
Bug description:  session_name gives bad result with session.auto_start=true

Description:
------------
As mentioned in bugs 1988 and 16389 when you set up
session.auto_start=true, then you can't play with session_name.
It's ok.

But if so, then session_name() should return the REAL name, not the false
one.

It's totally misleading to accept session name change (without an
Exception).

Reproduce code:
---------------
1) Set session.auto_start=true in php.ini
2) 
<?php

session_name('foo');
session_start();

print('Session name: '.session_name());
?>

Expected result:
----------------
Session name: PHPSESSID

Actual result:
--------------
Session name: foo


'session_name()' should give the real session cookie name.

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

Reply via email to