Jump to content

have a php website running in IIS which works fine except can't connect to mysql


cluce

Recommended Posts

I can someone tell me what I can do to fix this error? 

 

 

Call to undefined function mysqli_connect() in C:\Inetpub\wwwroot\email_username.php on line

 

I have these extensions enabled:

extension=php_mysql.dll

extension=php_mysqli.dll

 

I am not sure what else to do?"?

Link to comment
Share on other sites

yep. When I use the Apache server everything works fine. It's only when I use IIS. I get the connection area.  The reason I am trying to use IIS because thats the only way I know how to publish the site on my internal network for other people to see in my domain.  I dont know how to do that with Apache. I can only view my website locally (on my machine)with Apache.

Link to comment
Share on other sites

I'm not very profecient with IIS or mysqli (I prefer Apache and mysql) but maybe (just maybe) you need to change the settings on some .dll file to execute.

 

Again, i'm not sure what file and if it will help but I do recall reading something similar elsewhere.

 

Saf

Link to comment
Share on other sites

Installation on Windows Systems

 

MySQLi is not enabled by default, so the php_mysqli.dll DLL must be enabled inside of php.ini. Also, PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH. See the FAQ titled "How do I add my PHP directory to the PATH on Windows" for information on how to do this. Although copying libmysql.dll to the Windows system directory also works (because the system directory is by default in the system's PATH), it's not recommended.

 

As with enabling any PHP extension (such as php_mysqli.dll), the PHP directive extension_dir should be set to the directory where the PHP extensions are located. See also the Manual Windows Installation Instructions. An example extension_dir value for PHP 5 is c:\php\ext

 

    Note: If when starting the web server an error similar to the following occurs: "Unable to load dynamic library './php_mysqli.dll'", this is because php_mysqli.dll and/or libmysql.dll cannot be found by the system.

 

www.php.net/mysqli  have you looked into that?

Link to comment
Share on other sites

thanks for all your help. but yes I have done all that. I added the extensions, configured php.ini, copied libmysqli.dll in windows directory and checked all the extensions.

 

Now I am using wamp which I dont think it makes a difference as long as I am using the right php directory and dll files like I would with the standard php setup. I am sure you know this but wamp is php, apache and mysql all in one.

 

Using IIS and when I logon to a dynamic web page its like it can get to my database?? But it is there?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.