PHP 7 and CMSMS

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
cmsmsuserandy
New Member
New Member
Posts: 2
Joined: Sun Jun 23, 2013 11:33 pm

PHP 7 and CMSMS

Post by cmsmsuserandy »

I maintain a website for a non-profit that is currently at CMSMS 1.11.9. I recently received a notice from the hosting company (1&1) that they were only supporting PHP version 7 as part of the basic hosting package. I'm not able to find any discussion of PHP7 in any of the forums. If I switch to PHP7 on the "control panel" of the webhost I get an error

(Fatal error: Attempt to connect to database db319792237 on dbo319792237@db2302.perfora.net failed in /homepages/2/d319145794/htdocs/lib/adodb.functions.php on line 61 )

Running MySql 5.1.73 as well.

I'm intending to step through the upgrades to get to CMSMS 2.2 but I wondering if the PHP problem will still be there. Any insight? Words of encouragement?
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: PHP 7 and CMSMS

Post by calguy1000 »

CMSMS 1.x is not tested with, and known to generate warnings and notices on PHP7. However I have not seen that error explicitly.

We also will not be upgrading the 1.x series to be PHP7 compatible.

The 2.1.1 and 2.1.2 releases are known to work with PHP7. Though there may be a few notices that may occur. We are removing these as we find them.

This of course is for the CMSMS core only. Third party modules may not be PHP7 compatible.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: PHP 7 and CMSMS

Post by paulbaker »

cmsmsuserandy wrote:I recently received a notice from the hosting company (1&1) that they were only supporting PHP version 7 as part of the basic hosting package.
I am interested in this as I have a couple of clients who use their own 1&1 hosting. Haven't heard of this and it seems a little harsh as PHP7 is very new. I am sure it will cause their support department lots of grief as old scripts fail.

Their help page seems to suggest you can freely use other versions:
http://help.1and1.com/hosting-c37630/sc ... 92330.html
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
cmsmsuserandy
New Member
New Member
Posts: 2
Joined: Sun Jun 23, 2013 11:33 pm

Re: PHP 7 and CMSMS

Post by cmsmsuserandy »

Here is the notice I received from 1&1, I was using PHP 5.4
------------------
You are currently using PHP 5.4 which is an outdated PHP version. Since mid-September 2015, PHP 5.4 has not had any further development by the community.

Due to customer demand, we have continued to offer PHP 5.4 and want to ensure that you continue a secure and stable operation for your website. In order to do so, we have automatically transferred you to 1&1 Extended Support for PHP 5.4. With 1&1 Extended Support, you gain the benefit of ongoing security updates to keep your website protected, so you can continue to focus on your online content and presentation.

As a support service, 1&1 Extended Support for PHP 5.4 gives you time to plan the conversion to a more recent PHP version and implement it without pressure.

We are happy to provide this service. However, regular security inspections, adjustments and operation of these old versions of PHP are associated with rising costs, which has made it necessary for us to charge $7.19 per month for this service as of May 2016. We will send another reminder regarding this extra charge prior to the invoice.

If you no longer wish to use PHP 5.4, you can update your default PHP version in the 1&1 Control Panel at any time. All current PHP versions including the latest version, PHP 7, are free of charge.
-----------------------------------

I guess I overstated their position. I have moved to PHP 5.6 on the host so I guess that is a "current" PHP version. Although how long before that is too old to support as part of their regular fee?
chandra

Re: PHP 7 and CMSMS

Post by chandra »

cmsmsuserandy wrote:I maintain a website for a non-profit that is currently at CMSMS 1.11.9. I recently received a notice from the hosting company (1&1) that they were only supporting PHP version 7 as part of the basic hosting package. I'm not able to find any discussion of PHP7 in any of the forums.
Ok, here it is the discussion you've searched :D.

CMSMS 1.12.1 runs very well and stable on my host with PHP7.
cmsmsuserandy wrote:If I switch to PHP7 on the "control panel" of the webhost I get an error

(Fatal error: Attempt to connect to database db319792237 on dbo319792237@db2302.perfora.net failed in /homepages/2/d319145794/htdocs/lib/adodb.functions.php on line 61 )
Maybe there's no need to change CMSMS version and the solution is very simple. (I know such things like bigger updates are a little bit difficult to pay for nonprofit organizations)

The error message points the direction. A database connection could not be etablished.

If I'm right your config.php contains a line like this

Code: Select all

$config['dbms'] = 'mysql';
Change it to

Code: Select all

$config['dbms'] = 'mysqli';
'mysql' isn't longer supported by PHP7 but 'mysqli' ;).
chandra

Re: PHP 7 and CMSMS

Post by chandra »

cmsmsuserandy wrote:I have moved to PHP 5.6 on the host so I guess that is a "current" PHP version. Although how long before that is too old to support as part of their regular fee?
Most hosters are following the official PHP development timeline ;)

http://php.net/supported-versions.php

As you can see PHP 5.6 will be supported till December 2018.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: PHP 7 and CMSMS

Post by paulbaker »

cmsmsuserandy wrote:I have moved to PHP 5.6 on the host so I guess that is a "current" PHP version.
Sounds like a good plan.
cmsmsuserandy wrote:Although how long before that is too old to support as part of their regular fee?
I'm going to guess at least a year. 5.4 (which they are currently trying to ween everyone off) was released in March 2012, ~4 years ago.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
tristan
Dev Team Member
Dev Team Member
Posts: 375
Joined: Tue May 02, 2006 10:58 am
Location: The Netherlands

Re: PHP 7 and CMSMS

Post by tristan »

chandra wrote:If I'm right your config.php contains a line like this

Code: Select all

$config['dbms'] = 'mysql';
Change it to

Code: Select all

$config['dbms'] = 'mysqli';
'mysql' isn't longer supported by PHP7 but 'mysqli' ;).
Also noticed this today when updating a 2.1.2 install from PHP 5.6 to 7.0. Maybe it should be added as an extra step on:

http://docs.cmsmadesimple.org/upgrading/to-cmsms-2.x

to manually clean up the config to something like this:

http://docs.cmsmadesimple.org/configuration/config-file
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1789
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: PHP 7 and CMSMS

Post by DIGI3 »

I think you're misreading their announcement. They're saying they'll support all current versions, including 7. That means you probably have a lot of time left with 6.x too.
Not getting the answer you need? CMSMS support options
Locked

Return to “CMSMS Core”