Computer Printer - Loans - Personal Loans - Loans - Personal Loans

PDA

View Full Version : PHP Notice: Undefined Index


Will.Spencer
Aug 26th 2005, 5:23 am
Does anyone know why my Apache logs might be filling up with errors like these:


[client 62.232.224.52] PHP Notice: Undefined index: PATH_INFO in /var/www/html/fortliberty.org/ad_network_360.php on line 76, referer: http://www.google.co.uk/search?q=how+to+build+a+9mm&btnG=Search&hl=en

[client 62.232.224.52] PHP Notice: Undefined index: HTTPS in /var/www/html/fortliberty.org/ad_network_360.php on line 95, referer: http://www.google.co.uk/search?q=how+to+build+a+9mm&btnG=Search&hl=en

Will.Spencer
Aug 31st 2005, 4:36 pm
Anyone, anyone, Buehler?

Will.Spencer
Aug 31st 2005, 7:22 pm
I upgraded to the latest and greatest code, and my log files are still being filled with errors:

[client 24.240.24.88] PHP Notice: Undefined variable: string in /var/www/html/fortliberty.org/ad_network_365.php on line 10, referer: http://www.fortliberty.org/military-library/improvised-munitions-handbook
/improvised-munitions-handbook.shtml
[client 24.240.24.88] PHP Notice: Undefined index: PATH_INFO in /var/www/html/fortliberty.org/ad_network_365.php on line 76, referer: http://www.fortliberty.org/military-library/improvised-munitions-handbook
/improvised-munitions-handbook.shtml
[client 24.240.24.88] PHP Notice: Undefined index: PATH_INFO in /var/www/html/fortliberty.org/ad_network_365.php on line 76, referer: http://www.fortliberty.org/military-library/improvised-munitions-handbook
/improvised-munitions-handbook.shtml
[client 24.240.24.88] PHP Notice: Undefined index: PATH_INFO in /var/www/html/fortliberty.org/ad_network_365.php on line 76, referer: http://www.fortliberty.org/military-library/improvised-munitions-handbook
/improvised-munitions-handbook.shtml
[client 24.240.24.88] PHP Notice: Undefined index: PATH_INFO in /var/www/html/fortliberty.org/ad_network_365.php on line 76, referer: http://www.fortliberty.org/military-library/improvised-munitions-handbook
/improvised-munitions-handbook.shtml
[client 24.240.24.88] PHP Notice: Undefined index: PATH_INFO in /var/www/html/fortliberty.org/ad_network_365.php on line 76, referer: http://www.fortliberty.org/military-library/improvised-munitions-handbook
/improvised-munitions-handbook.shtml
[client 24.240.24.88] PHP Notice: Undefined index: HTTPS in /var/www/html/fortliberty.org/ad_network_365.php on line 95, referer: http://www.fortliberty.org/military-library/improvised-munitions-handbook/imp
rovised-munitions-handbook.shtml

digitalpoint
Aug 31st 2005, 8:29 pm
Sounds like you have over zealous error reporting setup for PHP by default. Add this to the beginning of the ad network file:

error_reporting(E_ALL & ~E_NOTICE);

Will.Spencer
Aug 31st 2005, 10:56 pm
Thanks Shawn!

This is the default setup under RedHat Enterprise Linux now.

I chose to edit /etc/php.ini instead.

digitalpoint
Sep 1st 2005, 3:08 am
Yeah, you can do that too. :)