tspek
01-26-2010, 07:30 PM
I keep getting this error and don't really understand it, despite a lot of research I haven't been able to to find a solution (or, frankly, a cause).
The error
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
This doesn't really make sense as I'm using PHP 5.
This error occurs when I visit this page immediately following a successful login. If i click refresh, it goes away. My guess is that it's related to the fact that i'm including all these files, which might have the same variable names???
Here is the page, let me know if you need to see the includes as well
<?php //my-races.php
#Authenticate User
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="styles/style.css" type="text/css" />
</head>
<body>
<div id="wrap">
<h1> Profile Page</h1>
<?php include ('includes/nav.php');?>
<div id="right_content">
<?php include('includes/profile.php');?>
</div><!--Right Content-->
<!-- <div id="center_content">
</div>Center Content-->
<?php
#If user is logged in
if (isset($_SESSION['username']))
{
include('includes/save-race-form.php');
?>
<div class="table">
<?php
include('includes/race-list.php');
}
#If user is not logged in
else
{
?>
<div id="saverace">
<form method="post" action="authenticate.php">
<fieldset>
<legend>Please login to view races</legend>
<label>Username</label><input type="text" name="username" />
<label>Password</label><input type="password" name="password" />
<input type="submit" value="Login" />
<h5><a href="lostpassword.php">Forgot my password</a></h5>
</fieldset>
</form>
</div><?php
}?>
</div> <!--Race List-->
</div><!--Wrap-->
<?php include('includes/footer.php');?>
</body>
</html>
The error
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
This doesn't really make sense as I'm using PHP 5.
This error occurs when I visit this page immediately following a successful login. If i click refresh, it goes away. My guess is that it's related to the fact that i'm including all these files, which might have the same variable names???
Here is the page, let me know if you need to see the includes as well
<?php //my-races.php
#Authenticate User
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="styles/style.css" type="text/css" />
</head>
<body>
<div id="wrap">
<h1> Profile Page</h1>
<?php include ('includes/nav.php');?>
<div id="right_content">
<?php include('includes/profile.php');?>
</div><!--Right Content-->
<!-- <div id="center_content">
</div>Center Content-->
<?php
#If user is logged in
if (isset($_SESSION['username']))
{
include('includes/save-race-form.php');
?>
<div class="table">
<?php
include('includes/race-list.php');
}
#If user is not logged in
else
{
?>
<div id="saverace">
<form method="post" action="authenticate.php">
<fieldset>
<legend>Please login to view races</legend>
<label>Username</label><input type="text" name="username" />
<label>Password</label><input type="password" name="password" />
<input type="submit" value="Login" />
<h5><a href="lostpassword.php">Forgot my password</a></h5>
</fieldset>
</form>
</div><?php
}?>
</div> <!--Race List-->
</div><!--Wrap-->
<?php include('includes/footer.php');?>
</body>
</html>