session warning in php 5
Posted: Fri Sep 22, 2006 3:40 pm
Hi, I am getting this warning when I run a page that uses sessions:
Changing the settings of the php.ini file is not an option since I don't have access to that file, is there a way around this problem?
This is sort of the code I'm using:
Has anyone had this problem? How did you solve it?Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
Changing the settings of the php.ini file is not an option since I don't have access to that file, is there a way around this problem?
This is sort of the code I'm using:
Code: Select all
<?php
session_start();
$var= "my string ";
session_register("var");
if(isset($_SESSION["var"])){
$var=$_SESSION["var"];
}
.
.
.