Strict standards: overriding an already defined constructor for the Object class in the \ cake \ libs \ object.php path on line 54

I am trying to configure the MS-MSQL database on cakephp (not mysql).

My Wampserver is 2.2e-php5.4.3-httpd2.2.22-mysql5.5.24-32b on my laptop (this is x64-bit Windows.

I have already invited these two libraries to start the sql server
extension = php_sqlsrv_54_ts.dll
extension = php_pdo_sqlsrv_54_ts.dll

I have these two errors when running cakephp 1.3

Strict standards: Redefining already defined constructor for class Object in C:\wamp\www\project\cake\libs\object.php on line 54<br/> Strict standards: Non-static method Configure::getInstance() should not be called statically in C:\wamp\www\project\cake\bootstrap.php on line 38 

I also install WampServer2.1e-x32 that it does not work :(

Any help plz

+7
source share
4 answers

you are using new php version. in php 5.4, E_STRICT is part of E_ALL

in cake 1.3, open the file /cake/bootstrap.php and change error_reporting as follows

error_reporting (E_ALL and ~ E_STRICT and ~ E_DEPRECATED);

+22
source

Your cakephp version is outdated and has problems with the latest version of PHP.

You can try updating the version of CakePhp. It seems that you are using version 1.3, so update it to the latest version. You can find it

https://github.com/cakephp/cakephp/archives/1.3

Only replacing the cake / folder with a new one will you fix this problem.

If you're new to CakePHP, it's best to check out the latest version 2.2.1. You can easily install this framework with your Wamp.

+6
source

Go to your Config / core.php and find the error handler configuration:

 Configure::write('Error', array( 'handler' => 'ErrorHandler::handleError', 'level' => E_ALL & ~E_DEPRECATED, 'trace' => true )); 

and replace 'level' with this:

 ... 'level' => E_ALL & ~E_STRICT & ~E_DEPRECATED, ... 
0
source

The solution is to upgrade cake version 1.3 to the latest version currently version 1.3.21.

Click here to download the latest version:

https://github.com/cakephp/cakephp/tags

0
source

All Articles