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.
From the Start menu, locate and open Microsoft Web Platform Installer from the applications list. Now, in the search bar (top right), enter the keyword IIS CGI. From the list of results, click Add next to IIS: CGI. Next, enter PHP 7.4 in the search bar and select PHP 7.4 (x86) from install.
Installing MySQL on Windows Simply download the installer package, unzip it anywhere, and run setup.exe. Default installer setup.exe will walk you through the trivial process and by default will install everything under C:\mysql. If all went well, you will see some messages about startup and InnoDB.
mysqli
is a PHP extension. So all you have to do is enable that extension in your php.ini
file.
Uncomment:
;extension=php_mysqli.dll
To:
extension=php_mysqli.dll
If using a share hosting account, you may have to create a .htaccess
and point it to your own copy of php.ini
.
To do that, you could try the following:
If php is installed as a module: In your .htaccess
put SetEnv PHPRC /location/todir/containing/phpinifile
If php is installed as a cgi extension, put your php.ini
in the cgi-bin
folder.
For some hosts, you can also just put your php.ini
in the folder where you would usually put your .htaccess
files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With