Search code examples
phpcakephpcakephp-1.2

run CakePHP 1.2.9 in PHP Version 5.4.19


I am running CakePHP 1.2.9 on my xampp server 1.8.2 with PHP version 5.4.19. But I am getting some errors like

Strict Standards: Redefining already defined constructor for class Object in C:\xampp\htdocs\PROJECT_NAME\cake\libs\object.php on line 62

Strict Standards: Non-static method Configure::getInstance() should not be called statically in C:\xampp\htdocs\paris-clone\cake\bootstrap.php on line 46

I tried to figure this out with this, but not succeeded. please help me with it. Thanks


Solution

  • Since PHP 5.4 E_STRICT is included in E_ALL. Maybe CakePHP 1.x doesn't know of E_STRICT setting ?

    http://php.net/manual/en/function.error-reporting.php

    Change logging in your application to display only errors:

        'level' => E_ERROR | E_WARNING | E_PARSE,
    

    Or set in in php.ini.

    You might also want to set level debug to disable error displaying on production mode in the first place. In cakephp 2 it is achieved by setting debug var in core.php:

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