How to convert 5.6.3.3 site to run under PHP 7.0

Permalink
My hosting site just dropped a bomb on me: they no longer support PHP 5.x, but rather PHP 7.0. Obviously my site won't come up without changes to it.

What do I have to do to the existing Concrete 5 code to make it run on PHP 7 .0? (I can't find anything on Google or C5)... a URL would be greatly appreciated...

Thanks in advance.

UPDATE: after reviewing both answers below, I'm going to rewrite the entire site using Quick n Easy Web Builder, which is easier and so much better than C5. Thanks for the responses.

SpokaneDude
 
hutman replied on at Permalink Reply
hutman
https://www.concrete5.org/community/forums/chat/concrete5.6-on-php7
CMSDeveloper replied on at Permalink Reply
CMSDeveloper
Hello,

There is some effort to keep the 5.6 branch alive:
https://www.concrete5.org/community/forums/chat/anyone-else-prefer-5...
mlocati replied on at Permalink Reply
mlocati
For everyone willing to use concrete5 5.6 with PHP 7.x: it is possible.

Here's how you can do that:

1. First of all, make a backup of everything (files and database), and be sure how you can restore it.

2. Delete the /concrete directory you have in your website.

3. Delete everything you may have in the /updates folder

4. Remove (if present) this text from the /config/site.php file
<?php define('DIRNAME_APP_UPDATED', 'concrete5....');?>

5. Extract the concrete directory from the archive available at
https://github.com/concrete5/concrete5-legacy/archive/master.zip...

6. Upload this new concrete directory to your website

7. Visit the pagewww.www.yourwebsite.com/index.php/tools/required/upgrade...

IMPORTANT NOTE: please remark that this new concrete5 version (5.6.4) is compatible with PHP up to version 7.2, but you should also check that other packages are compatible with PHP 7.x.
minaco replied on at Permalink Reply
This answer seems to be a really good guide. Unfortunately after I uploaded the new concrete directory, the website (including the last link) wasn't reachable anymore. So I restored the old concrete directory, but now I get the following error:

Warning: require(concrete/dispatcher.php): failed to open stream: No such file or directory in /var/www/clients/client2883/web7485/web/index.php on line 2

Warning: require(concrete/dispatcher.php): failed to open stream: No such file or directory in /var/www/clients/client2883/web7485/web/index.php on line 2

Fatal error: require(): Failed opening required 'concrete/dispatcher.php' (include_path='.:/opt/phpbrew/php/php-5.6.34/lib/php/pear') in /var/www/clients/client2883/web7485/web/index.php on line 2

Do you by any chance know what I can do next?
mlocati replied on at Permalink Reply
mlocati
I'd check your PHP error log to see why the upgrade failed.

And about reverting to the previous version: it seems that you haven't correctly restored concrete5 (the server can't find the file /var/www/clients/client2883/web7485/web/concrete/dispatcher.php). Double check that you fully restored the concrete directory, and that the file permissions are correct.
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
What version of concrete5 did you attempt to upgrade from?
This thread is about upgrading from 5.6.3.3
minaco replied on at Permalink Reply
Thank you, I got the backup running, it was one mistake in the directory, where the dispatcher.php was missing. :)

Regarding the update: I tried to update from version 5.4.2, then here lies the mistake. Thanks fro clarifying.
I tried before to update to 5.5.2.1 which is suggested in the dashboard, but it leads to the same errors.

In the log file I find the following over and over again:
'PHP message: PHP Strict Standards: Non-static method Cache::get() should not be called statically in /var/www/clients/client2883/web7485/web/concrete/models/package.php
... with all kinds of different file names at the end.

Is this something I can fix or should I rather start over and rebuild from scratch?
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Yeah its a common mistake..
The solution is to update incrementally, from memory I think in this order
5.4.2 > 5.4.2.2 > 5.5.0 > 5.6.0 > 5.6.3.5 > 5.6.4.0 (Github Version)
I think that order is correct but it would be worth searching for the answer here on the forums.
The error message "PHP message: PHP Strict Standards" will get sorted by one of the updates..
hutman replied on at Permalink Reply
hutman
What I've always had to do was 5.4.2 > 5.4.2.2 > 5.5.0 > 5.6.0 > 5.6.3 > 5.6.3.5 > 5.6.4.0 (Github Version)

Until you get to 5.6.0 (I believe) the Strict Standards messages will show up, but if you just replace the core in place and go to /index.php/tools/required/upgrade you can scroll down below the errors and still push the upgrade button.

Couple things to note:

1) Turn off Caching
2) Turn off Pretty URLs
3) Remove the define statement from the config/site.php for the version (if one exists)
4) Make a DB backup before you start so you can revert if needed
minaco replied on at Permalink Reply
This was my original posthttps://www.concrete5.org/community/forums/installation/update-from-...
then I found this thread and thought it would be the solution.
Dextercin replied on at Permalink Reply
thanks for the help i was stuck with this ! <a href="https://www.asciicode101.com"> </a>
Cahueya replied on at Permalink Reply
Have a look at concrete5 version 8.4.+ you will find that it is very easy drag&drop-style Site building.