Call to undefined function mysqli_connect()
Apache Version Apache/2.4.37 (Win64) PHP/7.3.0RC5
Apache API Version 20120211
Server Administrator xxx@xxx
Hostname:Port 127.0.0.1:80
Max Requests Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts Connection: 60 - Keep-Alive: 5
Virtual Server No
Server Root C:/Apache24
Loaded Modules core mod_win32 mpm_winnt http_core mod_so mod_access_compat mod_actions mod_alias mod_allowmethods mod_asis mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_groupfile mod_authz_host mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_include mod_isapi mod_log_config mod_mime mod_negotiation mod_setenvif mod_php7
I am able from a command prompt using mysql to connect to the server and perform any task. The above information is from phpinfo.php in htdocs.
MySQL Version 8.0.13
MySQL Workbench 8.0.13 (64 bit) functions correctly.
Using this file named c.php
<?php
/* Attempt MySQL server connection */
$link = mysqli_connect("localhost", "root", "ThePassword", "movies");
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
// Print host information
echo "Connect Successfully. Host info: " . mysqli_get_host_info($link);
// Close connection
mysqli_close($link);
?>
Produces this:
Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in C:\Apache24\htdocs\c.php:4 Stack trace: #0 {main} thrown in C:\Apache24\htdocs\c.php on line 4
I have tried every variation of procedural object oriented and still cannot connect.
Help Please
Subject
Written By
Posted
Call to undefined function mysqli_connect()
November 16, 2018 04:21PM
November 16, 2018 05:52PM
November 16, 2018 06:04PM
November 16, 2018 07:44PM
November 17, 2018 09:46AM
November 17, 2018 09:49PM
November 17, 2018 11:17AM
November 19, 2018 07:52AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.