Reputation: 171
The issue occurs with this code
<?php
define('DB_USER','root');
define('DB_PASSWORD','censored');
define('DB_HOST','localhost');
define('DB_NAME','censored');
$dbc = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
?>
I have installed php7.0-mysqli but I still get this error message
PHP Fatal error: Uncaught Error: Call to undefined function mysqli() in /var/www/html/actions/create_account.php:29\nStack trace:\n#0 {main}\n thrown in /var/www/html/actions/create_account.php on line 29, referer: http://localhost/register.php
Here is phpinfo() output on mysqli.
What is going wrong?
Upvotes: 3
Views: 8785
Reputation: 157887
The error message is crystal clear: there is no such function in PHP and never has been. There is only a function called mysqli_connect() and class called mysqli. But classes are not functions and have different syntax to handle
It means that, according to the error message, somewhere in the /var/www/html/actions/create_account.php on line 29 there is an improper call to mysqli
Upvotes: 5