0

I'm trying to populate my server with my database but I keep running into this error: Call to undefined function mysqli_connect()

I've looked online and I've edited my php.ini file to include the extension=mysqli as shown in the attached screenshot enter image description here

I'm perfectly able to connect to my DB in netbeans and I'm kind of stumped on why this function is stilled undefined.

If anyone has any other approaches I could take that would be super appreciative :)

Thank you

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • Did you restart the server after making INI changes? – Dharman Jan 20 '21 at 23:17
  • 1
    Does this answer your question? [Fatal error: Call to undefined function mysqli\_connect()](https://stackoverflow.com/questions/25281467/fatal-error-call-to-undefined-function-mysqli-connect) – Dharman Jan 20 '21 at 23:18

1 Answers1

0

Things that you should check for debugging.

  • If you change your php.ini while the server is running, restart your server because whenever you make changes to your php.ini you must restart it for it to be effective.
  • Make sure that mysqli.dll or php_mysqli.dll for windows or php mysqli.so binary for linux or mac os, is existing in the ext folder on your php installation folder as you enabled it on your php.ini.
  • In the past I have multiple PHP version installed on my machine, if you have the same scenario, make sure that your server (example: Apache, Nginx) is pointing the correct PHP version you want to use where you also configured your php.ini.
Jericho Aquino
  • 176
  • 1
  • 7