Upgrade cPanel to PHP 8.1 and CMSMS fails Topic is solved

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.
Post Reply
Andrew Prior
Forum Members
Forum Members
Posts: 241
Joined: Sun Oct 28, 2007 4:14 am
Location: Australia

Upgrade cPanel to PHP 8.1 and CMSMS fails

Post by Andrew Prior »

I'm having to upgrade to php 8.11 so that other software on my server can run (due to server upgrades by my hosting company.)
I am not able to get my CMS Simple to run on 8.1. As soon as I set cPanel to PHP8.1 the public facing website and the backend simply present me with a white page. We are talking Cms Version: 2.2.18

This appears to be the error, which I am not able to interpret. I'd be glad of any assistance.
I have the full list of server information and configurations below this.

Many thanks, Andrew
[24-Sep-2023 20:09:25 Australia/Brisbane] PHP Fatal error: Uncaught LogicException: Configuration error... mysqli functions are not available in /home/USER/public_html/lib/classes/Database/mysqli/class.Connection.php:16
Stack trace:
#0 /home/USER/public_html/lib/classes/Database/class.Connection.php(710): CMSMS\Database\mysqli\Connection->Connect()
#1 /home/USER/public_html/lib/classes/Database/class.compatibility.php(90): CMSMS\Database\Connection::Initialize()
#2 /home/USER/public_html/lib/classes/class.CmsApp.php(315): CMSMS\Database\compatibility::init()
#3 /home/USER/public_html/lib/include.php(198): CmsApp->GetDb()
#4 /home/USER/public_html/index.php(36): require_once('/home/USER/p...')
#5 {main}
thrown in /home/USER/public_html/lib/classes/Database/mysqli/class.Connection.php on line 16
[24-Sep-2023 20:11:15 Australia/Brisbane] PHP Fatal error: Uncaught LogicException: Configuration error... mysqli functions are not available in /home/USER/public_html/lib/classes/Database/mysqli/class.Connection.php:16
Stack trace:
#0 /home/USER/public_html/lib/classes/Database/class.Connection.php(710): CMSMS\Database\mysqli\Connection->Connect()
#1 /home/USER/public_html/lib/classes/Database/class.compatibility.php(90): CMSMS\Database\Connection::Initialize()
#2 /home/USER/public_html/lib/classes/class.CmsApp.php(315): CMSMS\Database\compatibility::init()
#3 /home/USER/public_html/lib/include.php(198): CmsApp->GetDb()
#4 /home/USER/public_html/index.php(36): require_once('/home/USER/p...')
#5 {main}
thrown in /home/USER/public_html/lib/classes/Database/mysqli/class.Connection.php on line 16
This is my server and cmsms versions:
Cms Version: 2.2.18

Installed Modules:

AdminSearch: 1.0.6
Album: 1.11
CGActionBar: 1.1.3
CGBlog: 1.15.14
CGExtensions: 1.65.2
CGFeedback: 2.2.6
CGJobMgr: 1.3.6
CGSimpleSmarty: 2.2.1
CMSContentManager: 1.1.10
CMSMSExt: 1.4.1
CMSMailer: 6.2.14
Captcha: 1.0.1
CmsJobManager: 0.1.3
DesignManager: 1.1.10
FileManager: 1.6.13
FilePicker: 1.0.6
JQueryTools: 1.4.2
MenuManager: 1.50.3
MicroTiny: 2.2.5
ModuleManager: 2.1.9
NMS: 2.13.3
Navigator: 1.0.9
News: 2.51.12
Printing: 1.1.2
Search: 1.53
Showtime2: 3.7.4
SmartImage: 1.1.0
ThemeManager: 1.1.8
TinyMCE: 3.3.2


Config Information:

php_memory_limit:
max_upload_size: 12000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
auto_alias_content: true
locale:
set_names: false
timezone: Australia/Brisbane
permissive_smarty: true


Php Information:

phpversion: 7.4.33
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 32759
E_STRICT: 2048
E_DEPRECATED: 8192
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 512M
max_execution_time: 90
register_globals: Off (False)
output_buffering: On
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 32M
upload_max_filesize: 12M
session_save_path: /tmp (0700)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On


Performance Information:

allow_browser_cache: On (True)
browser_cache_expiry: 30
php_opcache: On (True)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
auto_clear_cache_age: On (True)

Server Information:

Server Software: LiteSpeed
Server Api: litespeed
Server Os: Linux 4.18.0-477.15.1.lve.2.el8.x86_64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.11.5
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable


Permission Information:

tmp: /home/USER/public_html/tmp (0755)
tmp_cache: /home/USER/public_html/tmp/cache (0755)
templates_c: /home/USER/public_html/tmp/templates_c (0755)
modules: /home/USER/public_html/modules (0755)
uploads: /home/USER/public_html/uploads (0775)
File Creation Mask (umask): /home/USER/public_html/tmp/cache (0755)
config_file: 0444
----------------------------------------------
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Upgrade cPanel to PHP 8.1 and CMSMS fails

Post by Dr.CSS »

Try shutting off some of the third party modules, like anything that has CG in front of them...
To do this go to the server file system in cPanel and misname them, I just put a 1 in front of the name without changing the name itself...
Andrew Prior
Forum Members
Forum Members
Posts: 241
Joined: Sun Oct 28, 2007 4:14 am
Location: Australia

Re: Upgrade cPanel to PHP 8.1 and CMSMS fails

Post by Andrew Prior »

Thank you for this suggestion Dr. CSS. Slowly going through the list and not yet finding anything. I shall feedback if I find anything. Andrew
Andrew Prior
Forum Members
Forum Members
Posts: 241
Joined: Sun Oct 28, 2007 4:14 am
Location: Australia

Re: Upgrade cPanel to PHP 8.1 and CMSMS fails

Post by Andrew Prior »

It occurred to me that I could rename all the CGmodules at the one time, to make things a bit quicker. The site works perfectly where those modules are not in use in a template. So I upgraded cPanel to PHP8.1 and the working pages immediately went to a blank white page. So not the CG modules.

I removed Captcha and Album and CGBlogs, TinyMCE. No change. PHP 8.1 causes a blank white page.

I checked, so far, Album, Showtime2, CMSMailer, JQuerytools, NewsletterMadeSimple and it makes no difference. PHP 8.1 causes a blank white page.

I took out of .htaccess various sections, some of which caused warnings to show up, but PHP 8.1 still caused a blank white page.

I use the Portage theme written by Matt Hornsby, but also have the same theme on another site, with my variations, and it upgrades to php8.1 and works just fine. So not something oddball in the theme.

This is my config.php
<?php
# CMS Made Simple Configuration File
# Documentation: https://docs.cmsmadesimple.org/configur ... -reference
#
$config['dbms'] = 'mysqli';
$config['db_hostname'] = 'localhost';
$config['db_username'] = 'Blah';
$config['db_password'] = 'BlahBlah';
$config['db_name'] = 'moreblah';
$config['db_port'] = 0;
$config['db_prefix'] = 'cms_';
$config['persistent_db_conn'] = '';
$config['use_adodb_lite'] = '1';
$config['timezone'] = 'Australia/Brisbane';
$config['root_url'] = 'https://www.onemansweb.org';
$config['admin_url'] = 'https://www.onemansweb.org/anotherblah';
$config['admin_dir'] = 'anotherblah';
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';
$config['permissive_smarty'] = true;
$config['default_encoding'] = '';
$config['admin_encoding'] = 'utf-8';
$config['set_names'] = false;
?>
This is my .htaccess file
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{THE_REQUEST} !\.(txt|tmp)
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTP_HOST} ^onemansweb.org [NC]
RewriteRule ^(.*)$ http://www.onemansweb.org/$1 [L,R=301]

# <IfModule security2_module>
# SecRuleRemoveById 921130
# SecRuleRemoveById 980130
# SecRuleRemoveById 949110
# </IfModule>

##<IfModule mod_security.c>
## SecRuleEngine On
## SecFilterInheritance On
## SecFilterEngine On
## SecFilterScanPOST On
## SecRuleRemoveById 980130 921130 933100 933160 949110
##</IfModule>

# This file is specific to Apache configurations.
# It attempts to optimize traffic and configuration for your CMS Made Simple™ website.
# Many options are disabled by default as some providers do not allow you to override some of these settings in the .htaccess file.

#
# Attempt to override some PHP settings.
# These settings may be helpful on some hosts if your default configuration does not meet CMSMS's minimum requirements,
# and your host has given your account appropriate permissions.
#
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"
#php_value session.cookie_httponly true
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

#
# Disallow directory indexes. This can be an important security enhancement.
#
#Options -Indexes

#
# Don't allow the browser to know the type of signature.
#
ServerSignature Off

#
# Allow the Apache server to follow symbolic links. This is usually not necessary.
#
#Options +FollowSymLinks

#
# The following is to enable pretty URLs, only applicable if url_rewriting is set to 'mod_rewrite' in the config.php
DirectoryIndex index.php index.html index.htm
#
<IfModule rewrite_module>
RewriteEngine on
# If your CMSMS installation is in a subdirectory of your domain, you need to specify the relative path (from the root of the domain) here.
# In example: RewriteBase /[subdirectory name]
RewriteBase /

# RewriteRules
# RewriteRule ^do-you-want-wholeness-with-that-or-just-healing---luke-17-11-19.html$ https://www.onemansweb.org/do-you-want- ... .html.html [R=301,L]
# RewriteRule ^whose-boat-are-you-in---john-6-24-35.html$ https://www.onemansweb.org/whose-boat-a ... 24-35.html [R=301,L]



# Rewrites URLs in the form of /parent/child/grandchild but only rewrites if the requested URL is not a file or directory.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]



</IfModule>



# The following are highly recommended security settings for files in your CMSMS install that should not be browsed directly.
#
RedirectMatch 403 ^/.*\.htaccess$
RedirectMatch 403 ^/.*\.log$
RedirectMatch 403 ^/.*\.ini$
RedirectMatch 403 ^/.*config\.php$
RedirectMatch 403 ^.*/doc/.*$
RedirectMatch 403 ^.*/lib/.*\.php$
RedirectMatch 403 ^.*/tmp/.*\.php$
RedirectMatch 403 ^.*/modules/.*\.php$
RedirectMatch 403 ^.*/uploads/.*\.php$
RedirectMatch 403 ^.*/assets/.*\.php$
RedirectMatch 403 ^.*/assets/.*\.tpl$

#
# The following are performance optimizations and security enhancements for content that is served by your CMSMS installation.
#
<IfModule mod_headers.c>
# Disable Last-Modified for performance
Header unset Last-Modified
# Disable ETags
Header unset ETag
FileEtag None
# For Security
Header set X-Frame-Options "SAMEORIGIN"
</IfModule>

#
# The following setups compression for content, if compression is enabled on the server.
#
<IfModule deflate_module>
AddOutputFilterByType DEFLATE text/html text/css text/plain text/html text/xml image/gif image/jpeg image/png image/ico text/javascript application/x-javascript application/javascript application/json application/pdf
</IfModule>

#
# The following allows the browser to cache images, scripts, stylesheets and videos. If the expires module is enabled on the server.
# Note, this applies to admin directory stuff too.
# however, for php files in the admin directory we explicitly st the header to not expire
#
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
# Set expires tags on various file types... so that the browser won't attempt to reload them.
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/ico "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType video/x-flv "access plus 1 year"
ExpiresByType application/pdf "access plus 1 year"
ExpiresByType application/x-shockwave-flash "access plus 1 year"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/x-javascript "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
<IfModule mod_headers.c>
# Setting cache control to public allows proxy servers to cache the items too.
Header set Cache-Control "public"
</IfModule>
</IfModule>

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php5_module>
php_flag asp_tags Off
php_flag display_errors Off
php_value max_execution_time 90
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 512M
php_value post_max_size 32M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/tmp"
php_value upload_max_filesize 12M
php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
php_flag asp_tags Off
php_flag display_errors Off
php_value max_execution_time 90
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 512M
php_value post_max_size 32M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/tmp"
php_value upload_max_filesize 12M
php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1924
Joined: Mon Jan 29, 2007 4:47 pm

Re: Upgrade cPanel to PHP 8.1 and CMSMS fails

Post by Jo Morg »

A vanilla install of CMSMS over PHP 8.1+ runs perfectly so, there has to be a module breaking your installation.
Potential suspects, besides the ones DrCss already pointed:
- Album: 1.11
- NMS: 2.13.3
- ThemeManager: 1.1.8
- Printing: 1.1.2
Album hasn't been updated in quite a while, and while I've been considering doing it, hasn't been a priority because I don't have a way to keep track on the possible interest it may have for users. You have been one in a while :).
I would rename those modules folder temporarily until a culprit can be found.

Possibly not interfering with the issue but to prevent possible background noise, these entries are safe to remove from the config file
$config['persistent_db_conn'] = '';
$config['use_adodb_lite'] = '1';
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1629
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Upgrade cPanel to PHP 8.1 and CMSMS fails

Post by DIGI3 »

It could also be a PHP extension that's not turned on - you can often check these in cPanel so turn on anything related to mysql, or send the initial error log error to your host to see if they can help (if the module diagnosis doesn't bear fruit)
Not getting the answer you need? CMSMS support options
Andrew Prior
Forum Members
Forum Members
Posts: 241
Joined: Sun Oct 28, 2007 4:14 am
Location: Australia

Re: Upgrade cPanel to PHP 8.1 and CMSMS fails

Post by Andrew Prior »

Jo and DIG13: no joy yet. Currently have a support request in with the host re your suggestion of giving them the error message (which has been identical no matter what I've disabled or uninstalled.) Andrew
Andrew Prior
Forum Members
Forum Members
Posts: 241
Joined: Sun Oct 28, 2007 4:14 am
Location: Australia

Re: Upgrade cPanel to PHP 8.1 and CMSMS fails

Post by Andrew Prior »

Some missing extensions. Took them 2 minutes... Thanks for the help everyone. Andrew
hgmd2005
Forum Members
Forum Members
Posts: 23
Joined: Thu Feb 18, 2010 4:56 pm

Re: Upgrade cPanel to PHP 8.1 and CMSMS fails

Post by hgmd2005 »

what was the fix?
hgmd2005
Forum Members
Forum Members
Posts: 23
Joined: Thu Feb 18, 2010 4:56 pm

Re: Upgrade cPanel to PHP 8.1 and CMSMS fails

Post by hgmd2005 »

Andrew Prior wrote: Mon Sep 25, 2023 11:24 pm Some missing extensions. Took them 2 minutes... Thanks for the help everyone. Andrew
what extensions where missing?
Post Reply

Return to “CMSMS Core”