CakePHP error – Strict Standards and Deprecated

There was an error while working on CakePHP which turned out to be an issue with the PHP v5:

Strict Standards: Redefining already defined constructor for class Object in C:\xampp\htdocs\BFC\cake\libs\object.php on line 64
  1.  
  2. Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\BFC\cake\libs\inflector.php on line 131
  3.  
  4. Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\BFC\cake\libs\configure.php on line 136
  5.  
  6. Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\BFC\cake\libs\configure.php on line 226
  7.  
  8. Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\BFC\cake\libs\configure.php on line 903
  9.  
  10. Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\BFC\cake\libs\configure.php on line 943
  11.  
  12. Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\BFC\cake\libs\cache.php on line 71
  13.  
  14. Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\BFC\cake\libs\cache.php on line 155
  15.  
  16. Strict Standards: Non-static method Configure::getInstance() should not be called statically in C:\xampp\htdocs\BFC\cake\bootstrap.php on line 43
  17.  
  18. Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 80
  19.  
  20. Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 166
  21.  
  22. Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config\Container.php on line 111

This error can be resolved in following two ways:

    • Changing the php.ini file – Add the following in php.ini file and the error should go.
      error_reporting  =  E_ALL & ~E_STRICT

    • Changing the .htaccess in your root cakephp installation
      php_value error_reporting 6143

Leave a Reply


*