From:             kamil at kube dot org
Operating system: Redhat 9
PHP version:      5CVS-2004-12-19 (dev)
PHP Bug Type:     Session related
Bug description:  Illegal Characters in SessionID, session_name when set to 
"sid".

Description:
------------
Hi,

once I've updated first to 5.0.3 and now also to the latest snapshot, I
get "illegal character errors" when starting a session with session name
"sid" (defined in php.ini for default, see examples below).

When I change the session name to another value (like "foo" for example),
everything works fine and the session id is set correctly.

When I change the "foo" in the working example to "sid" to set the session
name explicit to that value, the same errors occur.

Thanks for help and best regards,
Kamil

Reproduce code:
---------------
<?
// Error code: Session name is "sid" for default from php.ini.
session_start();

echo 'Session Name: '.session_name().'<br />';
echo 'Session Id: '.session_id().'<br />';
?>

<?
// This code works fine (when changing foo to sid it also does not work).
session_name('foo');
session_start();

echo 'Session Name: '.session_name().'<br />';
echo 'Session Id: '.session_id().'<br />';
?>

Expected result:
----------------
>From error code:

Warning: session_start() [function.session-start]: The session id contains
illegal characters, valid characters are a-z, A-Z, 0-9 and '-,' in
/web/music2deal/htdocs/bla1.php on line 3
Session Name: sid
Session Id: 

Warning: Unknown: The session id contains illegal characters, valid
characters are a-z, A-Z, 0-9 and '-,' in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that
the current setting of session.save_path is correct (/tmp) in Unknown on
line 0

--------
>From the working code:

Session Name: foo
Session Id: u4i4o1hekpranqom4m8tu1u074


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

Reply via email to