PHP 7.1 Problems

4 posts by 2 authors in: Forums > CMS Builder
Last Post: September 6, 2019   (RSS)

By rez - August 22, 2019 - edited: August 22, 2019

Hi. My customer keeps contacting me every few days that their site is down. This is the error seen when you go to the domain:

"This program requires PHP v7.1.0 or greater. You have PHP v5.6.40 installed. Please ask your server administrator to upgrade PHP to a newer version"

I am using CMSB v3.51 (Build 2244)

To temp fix this, I have been going into cpanel and switching the PHP version around and back 7.1 or calling my host and having them look at this and we get the site back up. This time, I noticed in the htaccess file this is at the top:

<IfModule mod_suphp.c>
    suPHP_ConfigPath /opt/php71/lib
</IfModule>

However, at the the bottom of the htaccess file it was forcing PHP 5.6 with similar code.\

The full htaccess file is below. You can see it now has 7.1 at the bottom as well as the top. When the site is down,  I go into cpanel, (my host tech helped me figure this out) and I used the PHP selector to select 7.1 but also went into the public_html folder and had to do the same thing. The site comes back up with the fixed htaccess.

However, in a few days my customer will call me and tell me their site is down again and I will have to repeat this. So it seems that they are doing something in the cms that rewrites htaccess and makes the bottom force 5.6 again.

This must have happened when I updated CMSB to v3.51 (Build 2244) and PHP to 7.1 using the cpanel selector. 

Please advise. Do you know what keeps  rewriting htaccess and the force of 5.6?

I don't know if this error found in CMSB developer log is related:

E_NOTICE: Array to string conversion
/home2/maxscom/public_html/cmsAdmin/lib/viewer_functions.php
line 1043

#0 _errorlog_logErrorRecord() called at [/home2/domain/public_html/cmsAdmin/lib/errorlog_functions.php:64]
#1 _errorlog_catchRuntimeErrors() called
#2 implode() called at [/home2/domain/public_html/cmsAdmin/lib/viewer_functions.php:1043]
#3 _createDefaultWhereWithFormInput() called at [/home2/domain/public_html/cmsAdmin/lib/viewer_functions.php:399]
#4 _getRecords_getQuery() called at [/home2/domain/public_html/cmsAdmin/lib/viewer_functions.php:98]
#5 getRecords() called at [/home2/domain/public_html/index.php:33]

By rez - August 24, 2019 - edited: August 24, 2019

Ah, ok. Well I don't think that it was actually changing the cpanel / PHP version selector. Something has been writing into the file and forcing 5.6. Same thing, I guess. When I went into the cpanel 7.1 was actually still selected. I think the htaccess must take priority? I think when i would go into cpanel and switch from 7.1 to 5.6, then back to 7.1 that was actually a way of me rewriting the htaccess to force 7.1. I didn't understand how what i was doing was working to bring the site back up at the time. When my host told me something was writing that entry into the file to force 5.6, I figured this all out... I think... ;)

I assumed it was CMSB and they agreed. I hear you though. I'll take all of this info back to the host and maybe they can tell me what keeps writing 5.6 into the htaccess file. 

Thank you.

By rez - September 6, 2019 - edited: September 6, 2019

Hostgator issue with their easy/Apache4 with easy/Apache3 PHP handlers and cPanel updates. They aren't all on the same page or fully aware of the issue yet. It took 7 issues/ techs, a month,  and unfortunately,  I lost my temper to get out of the vortex and got Tier 3 support to resolve this (assuming it won't happen again). 

If anyone has Hostgator and this issue of mysterious htaccess being overwritten when upgrading to 7.1, let me know and you can refer them to my ticket.