0

Here are some examples to some of the errors. I heard this is a result of old code in new code, but I can't change my PHP version off the native 5.4 version ispmanager uses because I need Apache. Tried switching version but it messes up my site. Any ideas?



PHP Strict Standards:  Redefining already defined constructor for class Object in /var/www/ku/data/www/Public IP/cake/libs/object.php on line 54, referer: http://Public IP/posts/add


PHP Strict Standards:  Non-static method Configure::getInstance() should not be called statically in /var/www/ku/data/www/Public IP/cake/bootstrap.php on line 38, referer: http://Public IP/posts/add


PHP Deprecated:  Assigning the return value of new by reference is deprecated in /var/www/ku/data/www/Public IP/cake/libs/cake_log.php on line 182, referer: http://Public IP/posts/add```

2 Answers2

0

adding this in your PHP code may solve your problem.

error_reporting(0);
#this will display no errors.

error_reporting(E_ALL ^ E_STRICT);
#this will make it just not strict

Is this what you need?

brombeer
  • 8,716
  • 5
  • 21
  • 27
Nikhil Joy
  • 1
  • 1
  • 7
0

If you have access to the php.ini, add/change the following to it:

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

If you don't have access to the php.ini, and you run via Apache (you can have .htaccess file in root). Add this to .htaccess:

php_value error_reporting 30711

Last option is like mentioned by nikhil.

FJJ
  • 3
  • 4
  • Also looking at ispmanager. They advertise, you can run multiple php versions. The best option would be to look into upgrading PHP. Older PHP version can be harmfull by itself. https://www.ispsystem.com/software/ispmanager/features/php-versions – FJJ Jan 27 '21 at 12:42
  • I can't switch off the native version, i've tried and my website doesnt work. It has to have Apache PHP mode and nothing else. You can't do it with other versions because they are "alternate." – Aidan Garcia Jan 27 '21 at 18:29