You are here: Re: error_log : $_COOKIE "Undefined index" "PHP Notice" « PHP Programming Language « IT news, forums, messages
Re: error_log : $_COOKIE "Undefined index" "PHP Notice"

Posted by Jerry Stuckle on 12/07/07 15:15

Pseudonyme wrote:
> Dear All :
>
> Ever had an httpd error_log bigger than the httpd access log ?
>
> We are using Linux-Apache-Fedora-Httpd 2006 configuration.
>
> The PHP lines code that lead too tons of errors are :
>
> $http_ref= $HTTP_REFERER;
> $prog = $_COOKIE['cpm'."$j"];
> $redirect .='Location:'.$uploadpath;
>
> We believe HTTPD does not understand environement variables.
>
> We had to put that : error_reporting(0); in the top of the file to get
> the errors stop to be reported.
>
> An expert said to insert an isset funtion :
> http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Installation/Q_21354370.html
>
> But that doeas lead to a success.
>
> From your background and experience, how do you think we can fix up
> the code ?
>
> Regards;
> Gle Cougloff
>
>
>
>
>
>

Check to see if $_COOKIE['cpm'."$j"] exists before trying to use it.

Never use a variable (or in this case an array element) unless either
you have set it ourself, or have checked to see if it has been
previously set.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация