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 daniel - August 23, 2019

Hi rez,

I can't think of anything in CMSB that would be rewriting the .htaccess file like that - especially forcing it back to PHP 5.6. My initial thought is that there could be some configuration on the server that is checking for the directive on a regular basis, and adding it if it doesn't exist (the directive itself is for suPHP, which is server-specific). I realize you've talked to your host about this already, but it looks like they're going to be your best bet for getting this issue sorted, or at least diagnosing what is happening. A few specific things you can ask them about are:

  • Is there any higher-level server configuration for PHP versions that could be overriding the cPanel config?
  • Can they do a text search through your web directory to see if there is any custom code adding the directive?

I hope this helps point in the right direction, let me know if there's anything else I can help with!

Thanks,

Daniel
Technical Lead
interactivetools.com

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.