Strict Standards error after host upgraded server1 user found helpful
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.
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 188.8.131.52 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...
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.
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.
I'd suggest that you revert to your original concrete folder and follow the process to do manual updates, doing 184.108.40.206, 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.
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….
…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…
… 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.