mdzwolf Posted June 18, 2006 Share Posted June 18, 2006 I have installed php 5 on to my sever running IIS 6.0 and it works fine. I know that php 5 doesn't have built in support for mysql and I have followed instructions on the web to enable it but I am still having issues. When I try to load a page with the mysql_connect funtion I get:Fatal error: Call to undefined function mysql_connect()Here is what I have done to enable mysql support in php 5.in php.ini - located in the c:\windows directoryextension_dir = "C:\PHP\ext" - this is the current extension directory;extension=php_mssql.dll;extension=php_msql.dllextension=php_mysql.dllextension=php_mysqli.dll;extension=php_oci8.dll;extension=php_openssl.dlI have copied php_mysql.dll and php_mysqli.dll to the c:\windows\system32 directoryI have also added c:\php and c:\php\ext to the system path as well.I have restarted my machine and it still gives me the fatal error saying the mysql_connect funtion is undefined. Does anybody have any idea why this is still happening?Thanks in advanced. Quote Link to comment Share on other sites More sharing options...
fenway Posted June 18, 2006 Share Posted June 18, 2006 [!--quoteo(post=385228:date=Jun 17 2006, 11:09 PM:name=mdzwolf)--][div class=\'quotetop\']QUOTE(mdzwolf @ Jun 17 2006, 11:09 PM) [snapback]385228[/snapback][/div][div class=\'quotemain\'][!--quotec--]I have installed php 5 on to my sever running IIS 6.0 and it works fine. I know that php 5 doesn't have built in support for mysql and I have followed instructions on the web to enable it but I am still having issues. When I try to load a page with the mysql_connect funtion I get:Fatal error: Call to undefined function mysql_connect()Here is what I have done to enable mysql support in php 5.in php.ini - located in the c:\windows directoryextension_dir = "C:\PHP\ext" - this is the current extension directory;extension=php_mssql.dll;extension=php_msql.dllextension=php_mysql.dllextension=php_mysqli.dll;extension=php_oci8.dll;extension=php_openssl.dlI have copied php_mysql.dll and php_mysqli.dll to the c:\windows\system32 directoryI have also added c:\php and c:\php\ext to the system path as well.I have restarted my machine and it still gives me the fatal error saying the mysql_connect funtion is undefined. Does anybody have any idea why this is still happening?Thanks in advanced.[/quote]I thought you had to use the mysqli libraries.... Quote Link to comment Share on other sites More sharing options...
mdzwolf Posted June 18, 2006 Author Share Posted June 18, 2006 Well I just switch the statment to use mysqli_connect and it still gives me the same error. What do you mean by using the mysqli libraries? Quote Link to comment Share on other sites More sharing options...
fenway Posted June 18, 2006 Share Posted June 18, 2006 [!--quoteo(post=385233:date=Jun 17 2006, 11:24 PM:name=mdzwolf)--][div class=\'quotetop\']QUOTE(mdzwolf @ Jun 17 2006, 11:24 PM) [snapback]385233[/snapback][/div][div class=\'quotemain\'][!--quotec--]Well I just switch the statment to use mysqli_connect and it still gives me the same error. What do you mean by using the mysqli libraries?[/quote]I just mean that I was under the impression that you needed the updated mysqli libraries installed correctly for PHP5 to interface with MySQL. Again, I don't know any specifics, but it sounds like something I've heard before. Quote Link to comment Share on other sites More sharing options...
radalin Posted June 19, 2006 Share Posted June 19, 2006 Did you made your IIS configs? The problem in php there are lots of php.ini files :) You have to edit the right one for proper use. What you should edit is the one that IIS is using I think. If you edit that one and then try restarting your server. Or install wampserver on your machine which comes with mysql5 and php5. With some edits, you can configure it to control postgresql and other databases do (as I did :) Quote Link to comment 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.