0

I'm facing an issue while turning

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

The brief error looks something like:

Strict Standards: Non-static method CakeLog::handleError() should not be called statically in /var/www/.../cake/libs/controller/controller.php on line 373

Note: I'm using cakePHP 1.3.7

Adam Rackis
  • 82,527
  • 56
  • 270
  • 393
wakeup
  • 495
  • 4
  • 19

2 Answers2

1

Im no expert on cake php - but a simple install + test + documentation at .. http://book.cakephp.org/view/1584/Error-logging suggests that when your debug is turned to 0, your logging still continues logging for warnings and fatal errors therefore to turn of debug completely you also may need the logging turned to false.

Configure::write('log', false);

Extract: Errors are now logged when Configure::write('debug', 0); Would log only warning and fatal errors. Setting Configure::write('log', false); will disable error logging when debug = 0.

Also in the base controller.php (at libs/controller/controller.php there is no handleError code - was this added by your developers?)

  • Hi, your solution worked and stopped strict standard errors. But Notice errors started coming up.Temp fix we are doing is commenting `echo $_this->_output($data);` from handleError function in cake/libs/debugger.php – wakeup Nov 20 '11 at 08:28
0

Try putting the following in your bootstrap file (/app/config/boostrap.php)

error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED);

This is the suggested place for configuration of this kind.

Moz Morris
  • 6,681
  • 2
  • 20
  • 18
  • Hey, the change u suggested is not working, i got the same error msg :( – wakeup Nov 10 '11 at 13:13
  • You could try putting it directly in the index.php at /app/webroot/ – Moz Morris Nov 10 '11 at 14:22
  • Even that didnt work, i tried putting it on the page (ctp) where the error was coming and its working. But I cant put it in all the CTP files, Its not a wise thing to do... – wakeup Nov 11 '11 at 07:44