PDA

View Full Version : Multiple undefined errors: error_reporting set


blazr
07-15-2009, 06:03 PM
I have error_reporting set to E_ALL & ~E_NOTICE in my php.ini. I also added:

error_reporting(E_ALL ^ E_NOTICE);

to my header file just to be safe. I'm still getting multiple undefined variables when trying to display the calendar. Starting to get very frustrated so any help would be appreciated. Link is here:

http://www.orm-llc.com/showcal.php

header code:

<?php # header_cal.php

// This page begins the HTML header for the site.

// Start output buffering:

ob_start();

error_reporting(E_ALL ^ E_NOTICE);

// Initialize a session:

session_start();

//Check for a $page_title value:

if (!isset($page_title)) {

$page_title = 'Operative Resources Management, LLC';

}

?><!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=iso-8859-1" />

<title><?php echo $page_title;
?></title>



<style type="text/css"
media="screen">@import
"includes/layout.css";</style>

<?php $CSS=1; require("calendar/calendar.php"); ?>

</head>

<body>

<div id = "wrap">

<img src="images/ormlogo.jpg" />

<?php

// Check Session value to see if visitor is logged in:


echo '<p id="greeting">Welcome';

if (isset($_SESSION['first_name'])) {

echo ", {$_SESSION['first_name']}!";

echo '<a href="logout.php" title="Logout"> (Logout | </a>';

echo '<a href="change_password.php" title="Change Password"> Change Password)</a></p>';

} else {

echo ', guest!';

echo '<a href="login.php" title="Login"> (Login | </a>';

echo '<a href="forgot_password.php" title="Forgot Password"> Forgot Password)</a></p>';

}

?>

<!-- End of Header -->


showcal.php:

<?php # showcal.php

// This is the main page for the site.

// Include the configuration file:

require_once ('includes/config.inc.php');

// Set the page title and include the HTML header:

$page_title = 'Welcome to the ORM Intranet!';

include ('includes/header_cal.php');

?>

<ul id = "minitabs">

<li><a id = "current" href="index.php">home</a></li>
<li><a href="files.php">files</a></li>
<li><a href="reports.php">reports</a></li>
<li><a href="faq.php">faq</a></li>
<li><a href="help.php">help</a></li>
<?php

// Add link to Admin page based on user level:

if ($_SESSION['lvl_id'] == 1) {

echo '<li><a href="admin.php">administration</a></li>';

}

?>

</ul>

<div id = "main">

<?php require("calendar/calendar.php"); ?>

<?php

include ('includes/footer_cal.php');

?>


footer_cal.php:

<!-- End of Main -->

</div> <!-- Close #main div -->

<div id = "footer">

<?php # footer.html

// This page completes the HTML template.

// Display based upon the login status:

if (isset($_SESSION['user_id'])) {

echo '<p class="footer"><a href="logout.php"
title="Logout">Logout</a>

<a href="change_password.php"
title="Change Your Password"> Change Password</a></p><br />'

;

}

?>

<table cellspacing="0" cellpadding="0" border="0" align="center" width="90%">

<tr>

<td align="center" colspan="3" bgcolor="#F5F8FA">&copy; b.a. teague</td>

</tr>

</table>

</div> <!-- Close #footer div -->

</div> <!-- Close #wrap div -->

</body>

</html>

<?php //Flush the buffered output.

ob_end_flush();

?>

Brian
07-16-2009, 12:30 AM
I've never seen output like that before. The calendar already includes the code to turn this off.

lvl_id is not a calendar variable, so there may be another script on the page turning it back on?