Jump to content

Weird Bug


nepzap2

Recommended Posts

Dear all,

 

I updated my versions of php/MySQL and OS to Windows 7 Professional and weird "Warnings and Notices:" started popping up. E.g.

 

"Notice: Undefined index: page in C:\Server\htdocs\domain\index.php on line 25 "

 

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for '-4.0/DST' instead in C:\Server\htdocs\domain\index.php on line 12 "

 

I don't know what is going on. Unless I enter these following functions (error_reporting(0);, session_start();) with their parameters these warnings display. Can anyone offer any advice?

 

Any assistance is appreciated.

Link to comment
Share on other sites

Devotee,

 

Thank you for answering. The code is the following:

 

<?php
//error_reporting (E_ALL ^ E_NOTICE);
//error_reporting(0);
//session_start();
include "functions/functions.php";
       // Testing News Functions //
include "functions/functionsAllSummerInterns.php";
include "functions/functionsNews.php";
include "includes/header.php";


ini_set('arg_separator.output', '&');


	/* 

	Below are the cases for each section of the website. Through the $_GET[''] Method we detect which section the user 
	clicks on and style the section accordingly.

	*/

	// Body Content Begins


	switch (htmlentities ($_GET['page'])){
                
                More Code
               
?>

 

 

Link to comment
Share on other sites

When you updated PHP the new installed version defaulted to showing errors.  Now you're seeing an error that was previously hidden.  That's not a bug in PHP, though it represents a bug in your code.  $_GET['page'] doesn't exist when you expect it to exist.  Fix that.

 

The date timezone thing can be safely ignored, but it won't hurt you to explicitly set the timezone.

 

-Dan

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.