Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005
    Location
    United Kingdom
    Posts
    608
    Plugin Contributions
    0

    Default 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
    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?

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default 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
    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.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Mar 2005
    Location
    United Kingdom
    Posts
    608
    Plugin Contributions
    0

    Default 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.

 

 

Similar Threads

  1. Replies: 4
    Last Post: 10 Nov 2018, 01:32 PM
  2. v155 PHP Fatal error: Call to undefined function cfg_select_option
    By JakeLawless in forum General Questions
    Replies: 2
    Last Post: 21 Mar 2018, 08:02 PM
  3. v155 Admin error: Uncaught Error: Call to undefined function is__writeable
    By kalastaja in forum General Questions
    Replies: 5
    Last Post: 6 Oct 2016, 05:20 AM
  4. Fatal error: Call to undefined function
    By Brenda in forum General Questions
    Replies: 1
    Last Post: 9 Oct 2006, 08:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR