Help with Undefined offset on line 0

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
andregenovese
Forum Newbie
Posts: 3
Joined: Tue Mar 20, 2007 7:29 am

Help with Undefined offset on line 0

Post by andregenovese »

Hi there,

How do you debug an error on line 0?

I am getting the following:

Undefined offset: 420 in /filename.php on line 0

however, since the parser is giving me line 0, I don't know where to start....what does line 0 mean?

Thanks,
A.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Please try

Code: Select all

<?php
error_reporting(E_ALL);
ini_set('display_errors', true);

session_start();
echo 'auto_append_file: ', get_cfg_var('auto_append_file');
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Could also be from auto_prepend_file.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

oops, actually I was thinking about auto_prepend_file.

Code: Select all

<?php
error_reporting(E_ALL);
ini_set('display_errors', true);

session_start();
echo 'auto_prepend_file: ', get_cfg_var('auto_prepend_file'), "<br />\n";
echo 'auto_append_file: ', get_cfg_var('auto_append_file'), "<br />\n";
andregenovese
Forum Newbie
Posts: 3
Joined: Tue Mar 20, 2007 7:29 am

Thanks

Post by andregenovese »

Thanks for the prompt response....

The error magically disappeared (damn!!!), so I cannot debug it....the script imports values from an excel sheet and unfurtunately I lost the Excel sheet that was giving me problems and I cannot recreate the error!

Anyway, what would the lines of code provided have done?

Thanks a lot for your time!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Re: Thanks

Post by feyd »

andregenovese wrote:Anyway, what would the lines of code provided have done?
You can still run them and find out. ;)

Or look in the manual for the functions used...
andregenovese
Forum Newbie
Posts: 3
Joined: Tue Mar 20, 2007 7:29 am

Thanks

Post by andregenovese »

Just a quick message to thank you all for your time...

A.
Post Reply