Errors after installation

Errors after installation

Postby aquado » Wed Apr 09, 2008 4:39 pm

Hi Chris,

I've just installed your calendar and received such errors:
Notice: Undefined variable: list_months_to_show in index.php on line 80
Notice: Undefined variable: cal_no_day in includes]/functions.inc.php on line 80
Notice: Undefined index: day_3 in includes]/functions.inc.php on line 92
Notice: Undefined index: day_3 in includes]/functions.inc.php on line 108
Notice: Undefined variable: cal_no_day in includes]/functions.inc.php on line 124

After these errors at the bottom of the page I can see the calendar but on the page (index.php) I don't have jump menu for displaying "item to show on calendar".

Can you please tell me what I'm doing wrong or maybe what variable am I missing?
aquado
 
Posts: 11
Joined: Wed Apr 09, 2008 4:27 pm

Re: Errors after installation

Postby chris » Wed Apr 09, 2008 4:56 pm

Hi there and welcome to the forum :)
You are not doing anything wrong, these errors are in fact just "warnings" that php sends out informing you that you (ie the script) is using variables withou having first defined them. This is actually one of the best things about php - you don't have to define a variable before using it like you do in asp for example.
The level of the warnings is defined in the php configuration file which you probably don't have access to (php.ini).

However, clearly you don't want to see these warnings so you have 2 options (short of modifying the php configuration file).
1. Define all the variables that i mentions at the beginning of the page (eg $list_months_to_show=true; )
or
2. Add a line of code at the beginning of your pages to turn the php error reporting "down". Add this line before all the code, this will adjust the reporting for the page where you insert it (make sure it is within php tags):
Code: Select all
error_reporting(E_ERROR | E_WARNING | E_PARSE);

more info on php error reporting can be found here: php.net - error_reporting.

As to the jump menu, this was actually something that I have only just added to help demonstrate how the calendar can control varios items, it isn't a core part of the calendar so I haven't included it in the zipped file.
However, there is actually not much to it as it is nothing more than a standard select list of the items that you want to be able to control/show.
My list is done like this:
Code: Select all
<select name="id_item" onchange="this.form.submit()">
               <option value="6" '; if(ID_ITEM==6) echo ' selected'; echo '>Property 6</option>
               <option value="7" '; if(ID_ITEM==7) echo ' selected'; echo '>Property 7</option>
               <option value="8" '; if(ID_ITEM==8) echo ' selected'; echo '>Property 8</option>
               <option value="9" '; if(ID_ITEM==9) echo ' selected'; echo '>Property 9</option>
            </select>


I hope I have been able to help you get this working ;)

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Errors after installation

Postby aquado » Wed Apr 09, 2008 11:09 pm

Hallo Chris,

The speed and accuracy of your reply is astonishing !!! :o
That was exactly what I needed. ;)
THANK You very much !!!

Aquado.
aquado
 
Posts: 11
Joined: Wed Apr 09, 2008 4:27 pm

Re: Errors after installation

Postby chris » Thu Apr 10, 2008 12:33 am

Glad to be of help and glad that my script will hopefully be of some use to you ;)

Chris
User avatar
chris
Site Admin
 
Posts: 1089
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron