- Original Poster
- #1
Hi Guys,
I am getting the error below, I have had a google but still not really finding a solution.
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
Php code on page:
<?php
session_start();
define('ACCESS_PERMISSION', 1);
if($_GET['t'] == logout)
{ unset( $session_admin_level ); unset( $session_admin ); session_destroy();}
require_once('../includes/configuration.php');
require_once('../includes/database.php');
//-- Set the site settings
require_once("$config[site_path]includes/language_$config[site_language].php");
require_once("$config[site_path]includes/class.php");
//-- Set the page navigation start point to 0 if it isn't set
$common->session_variable();
if(!isset($start))
{ $start = 0; }
//-- Check to see if we need to process a form
if(isset($submit))
{
$component_process = $common->process_page();
if(!include("$config[site_path]components/$c/$s/_admin/process.php"))
{ $msg = $lang['error_file_not_found']."<br />$config[site_path]components/".$component_process."process.php"; }
}
else if(isset($c))
{
//-- Set the class for the current section
require_once("$config[site_path]components/$c/language_$config[site_language].php");
require_once("$config[site_path]components/$c/class.php");
if(isset($s))
{
require_once("$config[site_path]components/$c/$s/language_$config[site_language].php");
require_once("$config[site_path]components/$c/$s/class.php");
}
}
?>
<!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>
<title><?php echo $config['site_name'];?> : Administration</title>
<style type="text/css" media="screen,print">
<!--
@import url("admin.css");
-->
</style>
<script language="javascript" src="<?php echo $config['site_address'];?>includes/javascript/common.js" type="text/javascript"></script>
<script language="javascript" src="<?php echo $config['site_address'];?>includes/ajax/common.js" type="text/javascript"></script>
</head>
<body>
<div id="header">
<img src="images/logo.png" alt="<?php echo $config['site_name']?>" hspace="2" vspace="2" align="right" />
<?php
if($session_admin_level == 99)
{
?>
<div id="header_menu">
<a href="index.php" onmouseover="showit('home')">Admin Home</a>
<a href="index.php?c=users" onmouseover="showit('users')"><?php echo $lang['users'];?></a>
<a href="index.php?c=menu" onmouseover="showit('menu')"><?php echo $lang['menu'];?></a>
<a href="index.php?c=content" onmouseover="showit('content')"><?php echo $lang['content'];?></a>
<a href="index.php?" onmouseover="showit('components')"><?php echo $lang['components'];?></a>
<a href="index.php?c=administration" onmouseover="showit('administration')"><?php echo $lang['administration'];?></a>
<a href="index.php?t=logout"><?php echo $lang['logout'];?></a>
</div>
<?php
}
?>
</div>
<div id="container_1">
<div id="container_2" align="center">
<div id="menu_display" onmouseover="clear_delayhide()" onmouseout="resetit(event)"></div>
<div id="message_display">
<?php echo $msg != '' ? $common->error_display($msg) : ''; $msg = '';?>
</div>
<br />
<?php
if($session_admin_level == 99)
{
if(isset($c))
{ include("$config[site_path]components/$c/$s/_admin/index.php");}
else
{ include("$config[site_path]components/administration/_admin/main.php"); }
}
else
{
include("$config[site_path]components/administration/_admin/login.php");
}
?>
</div>
<div id="footer">
<ul>
<li id="copyright">© 2007 <?php echo $config['site_name'];?>.</li>
</ul>
</div>
</div>
<script>
if(document.getElementById('message_display'))
{ fadeOut('message_display', 100); }
</script>
<script language="JavaScript1.2">
/*
Tabs Menu (mouseover)- By Dynamic Drive
For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
This credit MUST stay intact for use
*/
var submenu = new Array()
//Set submenu contents. Expand as needed. For each content, make sure everything exists on ONE LINE. Otherwise, there will be JS errors.
// Create the items for the 'content'
<?php
$menu_headers = array('home', 'users', 'content', 'administration', 'components');
for($x = 0; $x < count($menu_headers); $x++)
{
$this_menu = "";
$sql = "SELECT * FROM components WHERE menu_admin = '$menu_headers[$x]' ORDER BY sequence";
$items = mysql_query($sql, $connect);
while($item = mysql_fetch_object($items))
{
$this_menu .= "<a href=\"index.php?c=$item->c&s=$item->s&t=$item->t\">$item->name</a> | ";
}
echo "submenu['".$menu_headers[$x]."'] = '$this_menu';\n";
}
$this_menu = "";
$sql = "SELECT * FROM menu_positions ORDER BY name";
$items = mysql_query($sql, $connect);
while($item = mysql_fetch_object($items))
{
$this_menu .= "<a href=\"index.php?c=menu&s=&t=list&menu_group=$item->name\">$item->name</a> | ";
}
echo "submenu['menu'] = '$this_menu';\n";
?>
//Set delay before submenu disappears after mouse moves out of it (in milliseconds)
var delay_hide = 50000
/////No need to edit beyond here
var menuobj=document.getElementById? document.getElementById("menu_display") : document.all? document.all.menu_display : document.layers? document.dep1.document.dep2 : ""
function showit(which)
{
clear_delayhide()
thecontent=(which==-1)? "" : submenu[which]
if (document.getElementById||document.all)
menuobj.innerHTML=thecontent
else if (document.layers)
{
menuobj.document.write(thecontent)
menuobj.document.close()
}
}
function resetit(e)
{
if (document.all&&!menuobj.contains(e.toElement))
delayhide=setTimeout("showit(-1)",delay_hide)
else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhide=setTimeout("showit(-1)",delay_hide)
}
function clear_delayhide()
{
if (window.delayhide)
clearTimeout(delayhide)
}
function contains_ns6(a, b)
{
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
</script>
</body>
</html>
Any help with this would be greatly appreciated.
Thanks
Hugo
I am getting the error below, I have had a google but still not really finding a solution.
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
Php code on page:
<?php
session_start();
define('ACCESS_PERMISSION', 1);
if($_GET['t'] == logout)
{ unset( $session_admin_level ); unset( $session_admin ); session_destroy();}
require_once('../includes/configuration.php');
require_once('../includes/database.php');
//-- Set the site settings
require_once("$config[site_path]includes/language_$config[site_language].php");
require_once("$config[site_path]includes/class.php");
//-- Set the page navigation start point to 0 if it isn't set
$common->session_variable();
if(!isset($start))
{ $start = 0; }
//-- Check to see if we need to process a form
if(isset($submit))
{
$component_process = $common->process_page();
if(!include("$config[site_path]components/$c/$s/_admin/process.php"))
{ $msg = $lang['error_file_not_found']."<br />$config[site_path]components/".$component_process."process.php"; }
}
else if(isset($c))
{
//-- Set the class for the current section
require_once("$config[site_path]components/$c/language_$config[site_language].php");
require_once("$config[site_path]components/$c/class.php");
if(isset($s))
{
require_once("$config[site_path]components/$c/$s/language_$config[site_language].php");
require_once("$config[site_path]components/$c/$s/class.php");
}
}
?>
<!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>
<title><?php echo $config['site_name'];?> : Administration</title>
<style type="text/css" media="screen,print">
<!--
@import url("admin.css");
-->
</style>
<script language="javascript" src="<?php echo $config['site_address'];?>includes/javascript/common.js" type="text/javascript"></script>
<script language="javascript" src="<?php echo $config['site_address'];?>includes/ajax/common.js" type="text/javascript"></script>
</head>
<body>
<div id="header">
<img src="images/logo.png" alt="<?php echo $config['site_name']?>" hspace="2" vspace="2" align="right" />
<?php
if($session_admin_level == 99)
{
?>
<div id="header_menu">
<a href="index.php" onmouseover="showit('home')">Admin Home</a>
<a href="index.php?c=users" onmouseover="showit('users')"><?php echo $lang['users'];?></a>
<a href="index.php?c=menu" onmouseover="showit('menu')"><?php echo $lang['menu'];?></a>
<a href="index.php?c=content" onmouseover="showit('content')"><?php echo $lang['content'];?></a>
<a href="index.php?" onmouseover="showit('components')"><?php echo $lang['components'];?></a>
<a href="index.php?c=administration" onmouseover="showit('administration')"><?php echo $lang['administration'];?></a>
<a href="index.php?t=logout"><?php echo $lang['logout'];?></a>
</div>
<?php
}
?>
</div>
<div id="container_1">
<div id="container_2" align="center">
<div id="menu_display" onmouseover="clear_delayhide()" onmouseout="resetit(event)"></div>
<div id="message_display">
<?php echo $msg != '' ? $common->error_display($msg) : ''; $msg = '';?>
</div>
<br />
<?php
if($session_admin_level == 99)
{
if(isset($c))
{ include("$config[site_path]components/$c/$s/_admin/index.php");}
else
{ include("$config[site_path]components/administration/_admin/main.php"); }
}
else
{
include("$config[site_path]components/administration/_admin/login.php");
}
?>
</div>
<div id="footer">
<ul>
<li id="copyright">© 2007 <?php echo $config['site_name'];?>.</li>
</ul>
</div>
</div>
<script>
if(document.getElementById('message_display'))
{ fadeOut('message_display', 100); }
</script>
<script language="JavaScript1.2">
/*
Tabs Menu (mouseover)- By Dynamic Drive
For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
This credit MUST stay intact for use
*/
var submenu = new Array()
//Set submenu contents. Expand as needed. For each content, make sure everything exists on ONE LINE. Otherwise, there will be JS errors.
// Create the items for the 'content'
<?php
$menu_headers = array('home', 'users', 'content', 'administration', 'components');
for($x = 0; $x < count($menu_headers); $x++)
{
$this_menu = "";
$sql = "SELECT * FROM components WHERE menu_admin = '$menu_headers[$x]' ORDER BY sequence";
$items = mysql_query($sql, $connect);
while($item = mysql_fetch_object($items))
{
$this_menu .= "<a href=\"index.php?c=$item->c&s=$item->s&t=$item->t\">$item->name</a> | ";
}
echo "submenu['".$menu_headers[$x]."'] = '$this_menu';\n";
}
$this_menu = "";
$sql = "SELECT * FROM menu_positions ORDER BY name";
$items = mysql_query($sql, $connect);
while($item = mysql_fetch_object($items))
{
$this_menu .= "<a href=\"index.php?c=menu&s=&t=list&menu_group=$item->name\">$item->name</a> | ";
}
echo "submenu['menu'] = '$this_menu';\n";
?>
//Set delay before submenu disappears after mouse moves out of it (in milliseconds)
var delay_hide = 50000
/////No need to edit beyond here
var menuobj=document.getElementById? document.getElementById("menu_display") : document.all? document.all.menu_display : document.layers? document.dep1.document.dep2 : ""
function showit(which)
{
clear_delayhide()
thecontent=(which==-1)? "" : submenu[which]
if (document.getElementById||document.all)
menuobj.innerHTML=thecontent
else if (document.layers)
{
menuobj.document.write(thecontent)
menuobj.document.close()
}
}
function resetit(e)
{
if (document.all&&!menuobj.contains(e.toElement))
delayhide=setTimeout("showit(-1)",delay_hide)
else if (document.getElementById&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhide=setTimeout("showit(-1)",delay_hide)
}
function clear_delayhide()
{
if (window.delayhide)
clearTimeout(delayhide)
}
function contains_ns6(a, b)
{
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
</script>
</body>
</html>
Any help with this would be greatly appreciated.
Thanks
Hugo