Fatal error: Uncaught Error: Call to undefined method mysqli::error()

Tom Faust's Avatar

Tom Faust

28 Feb, 2018 05:05 AM

Initializing FamilyConnection, setting up the database for the first time. I entered the admin user information and got this error. I can't find anything useful on the web or in the knowledge base. Any help would be appreciated.

Fatal error: Uncaught Error: Call to undefined method mysqli::error() in E:\Projects\fcms-3.7.0\familyconnections\inc\install_inc.php:204 Stack trace: #0 E:\Projects\fcms-3.7.0\familyconnections\install.php(724): installUsers(Object(mysqli), Array) #1 E:\Projects\fcms-3.7.0\familyconnections\install.php(82): setupDatabase() #2 E:\Projects\fcms-3.7.0\familyconnections\install.php(52): main() #3 {main} thrown in E:\Projects\fcms-3.7.0\familyconnections\inc\install_inc.php on line 204

  1. 1 Posted by diivious on 02 Mar, 2018 10:04 AM

    diivious's Avatar

    mysqli::error is no a function, so its not callable.

    Find all of these:
        $connection->query($sql) or die($sql . '<br/>' . $connection->error());

    and change it to:
        $connection->query($sql) or die($sql . '<br/>' . $connection->error);

  2. 2 Posted by diivious on 02 Mar, 2018 10:14 AM

    diivious's Avatar

    One other thing. once you fix this, your going to hit the reason our gettng that error. It seems mysql no longer allows all-zero dates. So the inserts with ...

         DATETIME NOT NULL DEFAULT 0000-00-00 00:00:00
    Will fail - which is why your seeing that secondary failure with error being used as a function.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac