Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to install mysqli on windows iis 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.

like image 409
Sibu Avatar asked Nov 22 '11 07:11

Sibu


People also ask

How do I install PHP on Windows IIS?

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.

How do I download MySQLi on Windows?

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.


1 Answers

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.

like image 145
F21 Avatar answered Oct 07 '22 17:10

F21