2

I get strict standards errors when I trying to run a cakephp application (version 1.3.4) under PHP 5.4.12 and Apache 2.4.4. I cannot upgrade the cakephp version of the application right now. I tried all the proposed solutions online but nothing worked (like setting the error_reporting in bootstrap.php, etc...). Has anybody managed to fix this problem? If so let me know please.

Thank you

user765368
  • 19,590
  • 27
  • 96
  • 167
  • http://stackoverflow.com/questions/9983286/disabling-strict-standards-in-php-5-4 – Kai Nov 04 '13 at 17:10

4 Answers4

1

You do could a code search in the cake library, and find places that set "error_reporting", you will find a few, and set that value to "E_ALL & ~E_DEPRECATED & ~E_STRICT", which will fix the issue.

For example, you might want to take a look at cake/libs/configure.php,

1

Take my opinion. Cakephp 1.3.4 does not work properly for versions higher than PHP 5.3.3. So do not try to run cakephp 1.3.4 with PHP 5.4. Either downgrade PHP OR upgrade CAKEPHP. But if you are going for upgrading CAKEPHP, be very very very careful. Up gradation of CAKEPHP sucks big time. I have recently did it in my project and believe me its really time consuming and difficult.

And if you still want to run the CAKEPHP 1.3.4 with PHP 5.4 then refer following link Disabling Strict Standards in PHP 5.4

Community
  • 1
  • 1
MANISH ZOPE
  • 1,181
  • 1
  • 11
  • 28
  • In what ways does it not work properly for 5.3.3+? Since you linked to an answer that shows how to disable strict standards, I'm guessing you've come across other incompatibilities? – Jon Cairns Jun 12 '14 at 07:36
1

I've just met these error messages when migrate cakephp 0.2.9 to PHP 5.5.9. Put line below

error_reporting( ~E_STRICT & ~E_DEPRECATED );

in file cake\libs\object.php, right before class Object statement. It works for me.

0

The only thing you can do at this point is to disable STRICT messages in your php.ini

As a reference, take a look at this: Disabling Strict Standards in PHP 5.4

Community
  • 1
  • 1
Guillermo Mansilla
  • 3,779
  • 2
  • 29
  • 34