Error when trying to get global variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux