aeroboy Posted July 20, 2006 Share Posted July 20, 2006 Hello, I have recently installed php5.1.4 and MySQL5.0.22 on my Windows Server 2003 server computer. I tried a simple connect by creating a file with the following code: [code]<html><body><?php$con = mysql_connect('localhost','root','MyRootPassword');if (!$con) { die("Could not connect: " . mysql_error()); }?></body></html>[/code]I get the following error message when I try to view this file in IE: PHP Fatal error: Call to undefined function mysql_connect() in MyFileLocation on line 5Can anyone help? I installed php on my hard drive i.e. C:\phpI installed MySQL on my hard drive as well i.e C:\Program Files\MySQLThanks in advance Quote Link to comment Share on other sites More sharing options...
fenway Posted July 20, 2006 Share Posted July 20, 2006 I think you need to be using the new mysqli set of libraries... Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 20, 2006 Share Posted July 20, 2006 If you are using PHP5, then you need to enable the mysql extension in order to use the mysql functions. [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]This thread[/url] should be of help. Quote Link to comment Share on other sites More sharing options...
aeroboy Posted July 20, 2006 Author Share Posted July 20, 2006 Thanks, guys...after researching and listening to you guys, I went to <a href="http://dev.mysql.com/downloads/connector/php/"> http://dev.mysql.com/downloads/connector/php/</a>and downloaded the mysqli extension. After that didn't work, the mysql extension worked fine. Your linked thread was perfect, wildteen. THANKS!! 8) Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 20, 2006 Share Posted July 20, 2006 If you want to use the mysqli replated functions you can do, by enabling the mysqli extension. 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.