[SOLVED] how to install mysqli on windows iis server?

Issue

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.

Solution

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.

Answered By – F21

Answer Checked By – Katrina (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published.