PHP 7.0 and Concrete5 [5.6.3.1]

Permalink
Hi All,

The website http://searchlocation.co.uk/ contains all house prices and streets in the UK and is therefore quite SQL and PHP heavy.

I'm looking for advice on people who have installed 7.0 and have done this successfully. When I switch it to 7.0 in the cPanel, straight away its the website is unavailable.

Any Advice would be great!

 
mnakalay replied on at Permalink Reply
mnakalay
Hello,
Your website uses Concrete 5.6.3.1 it is not compatible with PHP 7. Only the new branch 5.7 and above is compatible with PHP 7.

You would have to rebuild your site for the new version since there is no possibility to upgrade directly.

There is a tool to import data from a legacy version to a 5.7 version but it will only take care of core stuff (pages, users, files, core blocks...) and not anything custom or third-party.
drm92 replied on at Permalink Reply
Hey,

That's a shame, I did the upgrade on another site with 5.7 and it worked great but not this one.

Due to the sheer number of page (over 2 million) I just don't think upgrading would be the best thing (going to a 5.7.x) because it could break the website very easily!
mnakalay replied on at Permalink Reply
mnakalay
That's too bad. With 2 million pages PHP 7 would most likely provide a good performance boost.

But why don't you try anyway? The export of data wouldn't harm your site at all and you could do the import and test on a local website and see what happens?
JohntheFish replied on at Permalink Reply
JohntheFish
There are some notes on the 5.6 github about php7 and hacks that may be of interest.
https://github.com/concrete5/concrete5-legacy/pull/1927...
drm92 replied on at Permalink Reply
Thanks for the link John!

Will use a less significant site to test and will report back
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Whilst @Remo's Github files were fairly successful at hacking the core for PHP 7.0.10 compatability , the latest release of PHP 7.1 will break the hacking.
I think the PHP Team have tightened up a few loop holes!
madesimplemedia replied on at Permalink Reply
madesimplemedia
Yeah this is what I found too.
drm92 replied on at Permalink Reply
Made all the changes here:
https://github.com/concrete5/concrete5-legacy/pull/1927/files...

However *website* is currently unable to handle this request.

Is there anything else I should be doing?
drm92 replied on at Permalink Best Answer Reply
Just to wrap this up, I have successfully got PHP 7.0 running on 5.6.3.1 and can note very noticeable increase in speed.

To Do List:
1) Make all these changes
2) in site.php change to define('DB_TYPE', 'pdo_mysql');
ramonleenders replied on at Permalink Reply
ramonleenders
Would be awesome if you shared what you changed or make a commit or write a tutorial. I guess there are loads of people around wanting their sites to work with 7.x if it works as it should AND is faster. Does it work with PHP 5.6 as well, or is it really only for PHP 7.0/7.x?
drm92 replied on at Permalink Reply
Ill do a write up for you on my portfolio website when I get a spare 5 minutes!

It defintley worth doing - I've easily halved page load time according to GTMetrix!
Cahueya replied on at Permalink Reply
I just tried it locally and it works for 5.6.3.1 with PHP 7.08! Thank you so much!
walttheboss replied on at Permalink Reply
walttheboss
Please let me know what changes were made. OR is the only change the DB-Type you mentioned.
mnakalay replied on at Permalink Reply
mnakalay
Was any of the testing done with third-party add-ons installed or just C5 alone?

For instance would the eCommerce add-on work with PHP 7? How about problog or proforms?

Seems to me there would be lots of work to make an existing site transition to PHP 7.
drm92 replied on at Permalink Reply
There were some third part apps, however the main focus with PHP 7.0 is that mysql_connect will not work anymore.

Aslong as you are handy with PHP and either sqli or pdo, then you can easily modify the SQL if it is using mysql_connect