PDA

View Full Version : Undefined variable error


jtorral
April 10th, 2006, 11:35 AM
The follwoing is from my apache error log file

PHP Notice: Undefined variable: argv in /xxx/xxx/html/photopost/index.php on line 15

here is the start of line 15 for the pp code:


if ( is_numeric($argv[0]) ) {
header("Location: {$Globals['maindir']}/showphoto.php?photo={$argv[0]}");
exit;
}

jtorral
April 11th, 2006, 07:12 PM
Anyone know?

Chuck S
April 12th, 2006, 07:48 AM
Your error reporting is set too high. Nothing to worry about as its just reporting an empty variable which is not abnormal

Alien515
June 20th, 2006, 07:06 PM
Where would I go about setting the error reporting lower? In httpd.conf I currently use "warn" as the option.. Which would be lower, and why is this the only error of THIS type that ever shows up in there? :)

Ahh I see some reporting in the php file too, I'll play with the log option there.. Still curious why so far only PP is dropping errors in there?

Chuck S
June 20th, 2006, 09:15 PM
If your on windows and dont have access to lower it you can safely remove the code noted from index.php