RE: [PHP] php_flag session.auto_start 0 not working

From: Date: Thu, 27 Feb 2003 17:09:38 +0000
Subject: RE: [PHP] php_flag session.auto_start 0 not working
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-137425@lists.php.net to get a copy of this message
> I am using php_flag session.auto_start 0 in an .htaccess file to stop > sessions from auto starting. It works on all but the one below, it still > auto starts. The session replaces linked style sheets on the page > through some links. Can anyone see the problems? > > session_start(); > if ( isset($_GET['style']) ) { > $_SESSION['style'] = $_GET['style']; > } elseif ( !isset($_SESSION['style']) ) { > $_SESSION['style'] = 'styles'; > } You're calling session_start(), so of course the session is going to start, regardless of the auto_start setting. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#137425) next »