From:             mccarthy36 at earthlink dot net
Operating system: Linux 2.4.20-20.7
PHP version:      4.3.4
PHP Bug Type:     Session related
Bug description:  session_start() sends session cookie at every request

Description:
------------
session_start() is sending the session cookie at every request, and
Internet Explorer 6 hangs indefinitely the third time that happens.  This
is with PHP 4.3.4 (module) / Red Hat Linux 7.3 2.96-113 (kernel
2.4.20-20.7) / Apache 1.3.29. 

This problem seems to bear some relation to the problem reported in bug
#22771, though I am NOT using session_id(), as described in that report. 
Also similar is #25894, but that was marked as bogus.

The code fragment exhibits the problem on my system, described above.  The
same code on PHP 4.3.0 (module) / Slackware Linux (kernel 2.4.12) / Apache
1.3.26 works fine -- the session cookie is only sent on the first request.

Reproduce code:
---------------
ini_set( 'session.name', 'MyCookieName' );
ini_set( 'session.save_handler', 'files' );
ini_set( 'session.auto_start', '0' );
ini_set( 'session.gc_maxlifetime', '3600' );
ini_set( 'session.gc_probability', '5' );
ini_set( 'session.serialize_handler', 'php' );
ini_set( 'session.cookie_lifetime', '0' );
ini_set( 'session.cookie_path', '/' );
ini_set( 'session.cookie_domain', '.YOURDOMAIN.com' );
ini_set( 'session.use_cookies', '1' );
ini_set( 'session.use_only_cookies', '1' );
ini_set( 'session.cache_limiter', 'nocache' );
ini_set( 'session.cache_expire', '60' );
ini_set( 'session.use_trans_sid', '0' );

session_start();

Expected result:
----------------
I expect the session cookie 'MyCookieName' to be set on the first request,
only.

Actual result:
--------------
'MyCookieName' is set with each request.  Internet Explorer 6 / Win chokes
the third consecutive time this happens.

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

Reply via email to