note 9813 added to session_start

From: Date: Sat, 25 Nov 2000 19:16:35 +0000
Subject: note 9813 added to session_start
Groups: php.notes 
Request: Send a blank email to php-notes+get-8139@lists.php.net to get a copy of this message
Disclaimer: The effect is not 100% reproduceable, though I observed it many times with PHP4.0.3PL1. I wonder why session_start() behaves differently depending on the part of html it was invoked from. If we call session_start() before the opening <html> tag, the SID variable is not defined unless the browser lacks cookies. But if we call session_start after <head> or <body> tags, SID gets set to PHPSESID regardless of the browser capabilities. As a result, the URL is stuffed while it could be clean. http://www.php.net/manual/function.session-start.php

« previous php.notes (#8139) next »