Strict Standards error after host upgraded server

Permalink 1 user found helpful
Hi all,

I'm having a problem where my client's hosting company, Adam Internet (Australia), has upgraded their servers (now PHP 5.4.21) and my C5 website (that has run without a hitch for the past few years) now shows a list of errors that look like this...

Strict Standards: Non-static method Cache::get() should not be called statically in public_html/concrete/models/package.php on line 78

...the website is here:http://www.empirepool.com.au

I've browsed through various blogs on the forums here, so far I've created a php.ini file containing the line...
error_reporting = E_ALL & ~(E_NOTICE | E_STRICT | E_DEPRECATED)

...I put that file in the public_html folder (site root). So far, nothing seems to have changed. Not sure where to go now.

Please help.

View Replies:
mesuva replied on at Permalink Reply
mesuva
This has happened because you're running version 5.4.1.1 of concrete5, which is simply too old to be compatible with PHP 5.4.

You'll need to look to update your site to at least version 5.5 of concrete5. I'd personally take a full backup of the site, perform an update locally and then push that updated version up to the server.

You could also (after a full backup), try to manually update concrete5 directly on the server, even with all the error messages appearing, it still works to do the upgrade I believe. You need to update to 5.4.2.2 first, then up to the last version of 5.5. (then if that worked well, I'd go as far as 5.6).

For manual upgrades I normally do method 2 from here:http://www.concrete5.org/documentation/how-tos/developers/manually-...
I also normally just upload the new concrete5 core folder and swap the folder names over, then trigger the upgrade, as I described here:http://www.concrete5.org/community/forums/installation/manual-upgra...
staticfiction replied on at Permalink Reply
Thanks mesuva, I'll try this out...(edited) - I have since backed up my site/database then I tried out the manual FTP update of the 'concrete' folder to 5.4.2.2, it didn't seem to make a difference (still had all the errors), I reverted the concrete folder back to the original, then I managed to sign in and navigate to the C5 dashboard of my site, I then downloaded, then updated the site to 5.4.2.2 via the C5 dashboard. The errors still remained. I then downloaded, then updated the site to the next version which i think was 5.5.x.x via the dashboard. My site now looks different but it's still plagued with errors eg...

http://www.empirepool.com.au/

I'm assuming each update was defective due to the initial php errors preventing the updates from executing in their entirety. Is it salvageable at all from here? Please help. Thanks.
mesuva replied on at Permalink Reply
mesuva
You could perhaps try a more heavy-handed setting in the php.ini file:
error_reporting = ~E_ALL

But some hosts only allow you to make the setting change in the .htaccess file, you could try putting into that:
php_value display_errors 0
php_value error_reporting 30719

(I really just googled for some suggestions here)

If neither of those work, I'd suggest contacting Adam and asking them for advice or simply to ask them to make the change. Some hosts do offer different versions of PHP too, might be worth discussing.

Keep in mind though that although you might get this to hide the errors, ultimately you should be prepared to do the upgrade anyway as you'll probably find things won't work correctly, the dashboard will break, etc.

Cheers
-Ryan
mesuva replied on at Permalink Reply
mesuva
From what I can tell, I don't think you successfully updated to 5.4.2.2, so the update to 5.5 isn't going to work.

I'd suggest that you revert to your original concrete folder and follow the process to do manual updates, doing 5.4.2.2, then the latest 5.5. With the manual updates remember there are two steps - swapping out the core concrete folder, then triggering the upgrade script via /index.php/tools/required/upgrade.php

At the end of the day, if you have backups, it's all salvageable.
staticfiction replied on at Permalink Reply
Thanks for your help, Ryan. Unfortunately, nothing I've tried has worked, I'll try a few other things but looks like I might have a rebuild on my hands. Cheers.
staticfiction replied on at Permalink Reply
Update: Success!

I've managed to update my website and it's now fully functional on the upgraded servers.

This is the method I employed in the end:

I used the procedure outlined here….

http://www.concrete5.org/documentation/installation/moving_a_site...

…to move my client's site (files and database) to another server with a lesser php version (the shared server that I run my own website from)

I used phpMyAdmin to copy the database outlined here…

http://www.concrete5.org/documentation/how-tos/developers/backup-a-...

… and just used FTP client to copy all the files in the public_html directory.

Once the site was moved and the config/site.php was updated, it functioned properly again.

I then logged into the site and updated the site via the c5 dashboard.

Once updated, I moved the entire site back to the original servers (that run the newer PHP version).

The updated version of my site now functions without errors at it’s original domain/hosting.

Thanks Ryan (mesuva). All your advice turned out to be very helpful.
Korvin replied on at Permalink Reply
Korvin
I upgraded the docs on how to solve this recently:
http://legacy-documentation.concrete5.org/tutorials/how-fix-strict-...