Error when trying to get global variables

From: Date: Thu, 13 Jan 2005 08:03:02 +0000
Subject: Error when trying to get global variables
Groups: php.windows 
Request: Send a blank email to php-windows+get-25302@lists.php.net to get a copy of this message
Hi there I've used a tool called asp2php to convert all my asp files to php files, but now in ASP you have the global.asa file. I've converted this to global.php. So now part of it looks as follows: function Application_OnStart() { extract($GLOBALS); $Application["ConnectionString"]="PROVIDER=SQLOLEDB;DATA SOURCE=MYDB;UID=myuser;PWD=mypwd;DATABASE=mydb"; return $function_ret; } Now from one of the other pages: <? include "global.php"; session_start(); session_register("Login_session"); session_register("Outlet_session"); echo $Application["ConnectionString"]; ?> But I get the following warning: *Warning*: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\Program Files\Apache Group\Apache2\htdocs\spar\admin\global.php:52) in *C:\Program Files\Apache Group\Apache2\htdocs\spar\admin\login.php* on line *3 On line 52 in global.php there is nothing. This is the end of the file. Line 3 in login.php is: session_start(); *echo $Application["ConnectionString"]; also doesn't print out anything. What am I doing wrong? Cheers Louis

« previous php.windows (#25302) next »