#25906 [Opn->Bgs]: Sessions and Framesets

From: Date: Mon, 20 Oct 2003 07:37:23 +0000
Subject: #25906 [Opn->Bgs]: Sessions and Framesets
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-49214@lists.php.net to get a copy of this message
ID: 25906 Updated by: sniper@php.net Reported By: thxmike at hotpop dot com -Status: Open +Status: Bogus Bug Type: Session related Operating System: Windows 2000 Professional PHP Version: 4.3.3 New Comment: Your script is broken: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /www/htdocs/test2/main.php:3) in /www/htdocs/test2/main.php on line 10 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /www/htdocs/test2/main.php:3) in /www/htdocs/test2/main.php on line 10 Array ( [temporary] => temporary ) 'session_start();' has to be FIRST line and no output is allowed before it. (unless you have output_compression enabled) Previous Comments: ------------------------------------------------------------------------ [2003-10-19 22:31:22] thxmike at hotpop dot com I sent the support specialist a zip file with the web pages that has the problem. ------------------------------------------------------------------------ [2003-10-19 04:17:40] sniper@php.net Still waiting for the test package. ------------------------------------------------------------------------ [2003-10-18 23:01:14] thxmike at hotpop dot com Description: ------------ I am trying to use sessions in a frameset. When I change the page using a link from another frame the $_SESSION is unavailable. I am not certain if the $_SESSION is available in all frames. It does not appear so. I though the session is available until the browser closes. Reproduce code: --------------- Page 1: include('class/adodb/adodb.inc.php'); include('class/Hotel/hotel.php'); include('class/DatabaseObject/DatabaseObject.php'); session_start(); $_SESSION['temporary'] ='temporary'; Second page include('class/adodb/adodb.inc.php'); include('class/Hotel/hotel.php'); include('class/DatabaseObject/DatabaseObject.php'); session_start(); print_r ($_SESSION); Expected result: ---------------- Array ( [temporary] => temporary ) Actual result: -------------- Array() ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25906&edit=1

« previous php.bugs (#49214) next »