I am trying to run mysqli on my remote windows server and I keep getting this error
Fatal error: Call to undefined function mysqli_connect()
I assume mysqli is not installed on my remote server. So how do I install mysqli on my remote server.
I am trying to run mysqli on my remote windows server and I keep getting this error
Fatal error: Call to undefined function mysqli_connect()
I assume mysqli is not installed on my remote server. So how do I install mysqli on my remote server.
mysqli
is a PHP extension. So all you have to do is enable that extension in yourphp.ini
file.Uncomment:
To:
If using a share hosting account, you may have to create a
.htaccess
and point it to your own copy ofphp.ini
.To do that, you could try the following:
If php is installed as a module: In your
.htaccess
putSetEnv PHPRC /location/todir/containing/phpinifile
If php is installed as a cgi extension, put your
php.ini
in thecgi-bin
folder.For some hosts, you can also just put your
php.ini
in the folder where you would usually put your.htaccess
files.(Working on windows)
I was facing exactly the same issue.
In my case, the problem was that I had saved the php.ini file as a text file. As soon as I converted the text file to "All Files" in notepad and gave it the ".ini" extension, it became a "Configuration Settings File" and it worked.
You may check if this is the case by going through the loaded configuration file row in
phpinfo()
. If the value is 'none', you may be facing a similar issue.Note: I had already uncommented the extensions and fixed the extension directory.