Notice: Constant DIR_FS_CATALOG already defined
I've already commented out display_errors
in php.ini
, but is not working.
How do I make PHP to not output such things to browsers?
UPDATE
I put display_errors = Off
there but it's still reporting such notices,
Is this an issue with PHP 5.3?
Reporting numerous Call Stack too..
I found this trick out recently. Whack an @ at the start of a line that may produce an warning/error.
As if by magic, they dissapear.
For the command line php, set
in
/etc/php5/cli/php.ini
command
php
execution then ommits the notices.source http://php.net/manual/en/function.error-reporting.php
I prefer to not set the
error_reporting
inside my code. But in one case, a legacy product, there are so many notices, that they must be hidden.So I used following snippet to set the serverside configured value for
error_reporting
and subtract theE_NOTICE
s.Now the error reporting setting can further be configured in
php.ini
or.htaccess
. Only notices will always be disabled.by not causing the errors:
If you really have to, then change error reporting using error_reporting() to E_ALL^E_NOTICE.
You are looking for: