HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   General (
-   -   Disabling PHP notices to error.log (

Norman 22nd February 2013 01:15

Disabling PHP notices to error.log

What is the recommended way to disable PHP notices to a clients error log?
I dont want to disable it for all clients , but just for specific site.

Any ideas? :)

[Wed Feb 20 17:56:38 2013] [warn] [client x.x.x.x] mod_fcgid: stderr: PHP Notice: Undefined index: account_id in /var/www/clients/clientX/webX/web/backend/system/commons.php on line 188, referer: http://X

The PHP scripts already contain <?php ini_set('display_errors', 0); ini_set("log_errors", 0); ini_set("error_reporting", null); error_reporting(0); session_start(); but they still seem to report notices.

till 22nd February 2013 14:18

which php mode do ou use in that website?

Norman 22nd February 2013 15:27

Should be fast-cgi. :)

till 22nd February 2013 15:40

Then you can set a custom error reporting level for this site in the php.ini field of the options tab of the website.

Norman 22nd February 2013 15:43

To disable all notices to error log, what would I enter?
Im a bit uncertain of the syntax for this field.

till 22nd February 2013 16:02

To show all errors except of notices, use this level:

error_reporting = E_ALL & ~E_NOTICE

All times are GMT +2. The time now is 22:02.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.