cluce Posted May 29, 2007 Share Posted May 29, 2007 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?"? Quote Link to comment https://forums.phpfreaks.com/topic/53453-have-a-php-website-running-in-iis-which-works-fine-except-cant-connect-to-mysql/ Share on other sites More sharing options...
per1os Posted May 29, 2007 Share Posted May 29, 2007 Make sure you have the odbc driver installed. Google mysql odbc Quote Link to comment https://forums.phpfreaks.com/topic/53453-have-a-php-website-running-in-iis-which-works-fine-except-cant-connect-to-mysql/#findComment-264193 Share on other sites More sharing options...
cluce Posted May 29, 2007 Author Share Posted May 29, 2007 I installed the Connector/ODBC 3.51 -- Generally Available (GA) release and I still get this connection error? Quote Link to comment https://forums.phpfreaks.com/topic/53453-have-a-php-website-running-in-iis-which-works-fine-except-cant-connect-to-mysql/#findComment-264221 Share on other sites More sharing options...
per1os Posted May 29, 2007 Share Posted May 29, 2007 Have you restarted the server since you put in those extensions and made sure that the php_mysqli.dll extension is in the extension directory? Quote Link to comment https://forums.phpfreaks.com/topic/53453-have-a-php-website-running-in-iis-which-works-fine-except-cant-connect-to-mysql/#findComment-264223 Share on other sites More sharing options...
cluce Posted May 29, 2007 Author Share Posted May 29, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/53453-have-a-php-website-running-in-iis-which-works-fine-except-cant-connect-to-mysql/#findComment-264231 Share on other sites More sharing options...
saf Posted May 29, 2007 Share Posted May 29, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/53453-have-a-php-website-running-in-iis-which-works-fine-except-cant-connect-to-mysql/#findComment-264233 Share on other sites More sharing options...
per1os Posted May 29, 2007 Share Posted May 29, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/53453-have-a-php-website-running-in-iis-which-works-fine-except-cant-connect-to-mysql/#findComment-264235 Share on other sites More sharing options...
cluce Posted May 29, 2007 Author Share Posted May 29, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/53453-have-a-php-website-running-in-iis-which-works-fine-except-cant-connect-to-mysql/#findComment-264257 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.