Reply to Re: apache error log fills up with php notice:

Your name:

Reply:


Posted by Mike Willbanks on 09/17/05 01:26

Mike,
> apache error log:
>
> /var/log/httpd-error.log
>
> gets filled up with various notices such as:
>
> php notice: Use of undefined constant name - assumed 'name' in xxxxx on
> line 1, referer: yyyy
>
> the size of the file is 200 mb now..
>
> how do I suppress these notices without touching my php source code ?

What you could simply do is create a .htaccess environmental variable
with php_flag error_reporting E_ALL & ~E_NOTICE

In your php configuration you could set error_reporting to that value as
well.

I would also suggest that you fix the code that is giving the E_NOTICE
problems. Your problem with the use of an undefined constant is most
likely because you are using an array and not puting in the '.

For example you are doing: $array[index]
The correct way is: $array['index']

If you are inside of a string with "" use: {$array['index']}


--
Mike Willbanks
Zend Certified Engineer
http://www.digitalstruct.com

[Back to original 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

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