Call to undefined function mysqli_connect()

Hi all, I am not sure if this is the proper place to post this, or if it should be the netbeans or wamp site. Perhaps someone might know the answer

I am working my way through the 4th edition of “build your own database driven website using php & mysql” and in chapter 4 I have run into a problem.

I have windows 7 and I’ve installed wamp server 2.0i and verified mysql is running - I’ve created the jokes database from the book.

I installed netbeans ide 6.8 to do the html/php coding and it says it includes mysql support. When I display the php extensions in the WAMP server there is a checkbox next to php_mysqli (and php_mysql)

However when I use the following code from the book (page 118):
$link = mysqli_connect(‘localhost’, ‘root’, ‘password’);

netbeans doesn’t pop up with an auto-complete for the function and I receive the following error in my browser:
Fatal error: Call to undefined function mysqli_connect() in C:\wamp\www\connect\index.php on line 2

so I am guessing there is a disconnect in the php support but I don’t know why or where the problem might be. Does anyone know a direction to point me at?
Any help would be appreciated.

Thanks for the pointer!
it turns out with the wamp install, there are 3 different php.ini config files, plus the httpd.conf config file plus the path variable setting.

it took several attempts at different combinations (should I set the php dir to “c:/wamp/bin/php/php5.3.0/ext/” or “C:\wamp\bin\mysql\mysql5.1.36\bin” or “c:\wamp\bin\php”)

but i eventually got it…whew!

thanks again

Hi, and welcome on SitePoint :wave:

Looks like the msyqli extension isn’t installed on your system.
Take a look here how to install it.