Turn off notices in cakePHP

Rohit Londhe picture Rohit Londhe · Dec 20, 2013 · Viewed 14.8k times · Source

I am new with cakePHP. I facing issue with notice on live server. I want to suppress or turn off these notices. I have tried adding,

error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING ^ E_DEPRECATED);

in the index.php file in main folder. Also added same in bootstrap.php file but no luck. Can anybody suggest me how I can do this.

Answer

Siraj Khan picture Siraj Khan · Dec 20, 2013

You can disable the debug feature by turning debug to 0 in the app\Config\core.php file

Configure::write('debug', 0);

If still you get the same issue so please check your live server Php version and also check the same on development server, I think there is php version compatibility issue so please see link http://bakery.cakephp.org/articles/markstory/2013/07/05/cakephp_2_3_7_2_4_0-beta_released

Hope it should work for you.