PHP Fatal error: Uncaught Error: Call to undefined function mysqli_close()
Hi,
Zen Cart V1.5.5f
PHP 7.1.15
MySQL 5.6.38
After upgrading to PHP 7.1
I get the following error when accessing my sites
Code:
[02-Apr-2018 09:19:36 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysqli_close() in ...../includes/classes/db/mysql/query_factory.php:131
Stack trace:
#0 /...../includes/classes/db/mysql/query_factory.php(136): queryFactory->close()
#1 [internal function]: queryFactory->__destruct()
#2 {main}
thrown in /...../includes/classes/db/mysql/query_factory.php on line 131
Lines 130 to 133 from includes/classes/db/mysql/query_factory.php
PHP Code:
function close() {
@mysqli_close($this->link);
unset($this->link);
}
My host is saying
Quote:
suPHP is not supported on php v7 so i have commented it on .htaccess
Is this statement correct? I can find nothing on the forums to suggest this and would have thought others would have had a similar issue?
Re: PHP Fatal error: Uncaught Error: Call to undefined function mysqli_close()
Well, from the home page of suphp: https://www.suphp.org/Home.html
Quote:
suPHP is not maintained any longer and will not receive any further updates not even security patches.
If you want to continue using suPHP, feel free to create a fork (the complete code is licensed under the GPL version 2).
If you are looking for an alternative, have a look at
php-fpm.
With the last version of suPHP being provided in 2013, I would say that I would agree that suPHP isn't expected to work (is not supported) with PHP 7.x.
Re: PHP Fatal error: Uncaught Error: Call to undefined function mysqli_close()
Thanks for the info. I leave defaults in place and only request changes when they are needed to run Zen Cart. I can't even figure out why that line is in my .htaccess as it appears on one site and not the other. Never even heard of suPHP until I got the above error and started Googling.
Like busses though there are none and then two come along at once. Just figured out that on one of my sites my host created a custom php.ini to fix a previous issue. Now that I have upgraded to PHP 7.1 that custome php.ini was outdated and redundant and was the cause of my error. Have deleted that and my site is loading again.