shermili Posted January 10, 2007 Share Posted January 10, 2007 HII get this error Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\connect.php on line 2when i use this code<?php$link = mysql_connect('localhost 3306', 'root', 'hetal123');if (!$link) { die('Could not connect: ' . mysql_error());}echo 'Connected successfully';mysql_close($link);?>i edited PHP.ini and httpd.conf file and still no luckcan anybody help me? Quote Link to comment Share on other sites More sharing options...
trq Posted January 11, 2007 Share Posted January 11, 2007 Did you read the stikcy at the top of this forum? Id'e start there. Quote Link to comment Share on other sites More sharing options...
shermili Posted January 11, 2007 Author Share Posted January 11, 2007 what do you mean sticky. i don't get it Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted January 11, 2007 Share Posted January 11, 2007 The sticky thorpe is refereeing to is the thread labelled [b]Call To Undefined Function mysql_connect[/b]That thread provides a link to an FAQ [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]here[/url]. This FAQ will help to sort out this error. Quote Link to comment Share on other sites More sharing options...
shermili Posted January 11, 2007 Author Share Posted January 11, 2007 i tried everything from FAQ.doesn't help Quote Link to comment Share on other sites More sharing options...
shermili Posted January 11, 2007 Author Share Posted January 11, 2007 am i suppose to do anything on mysql side besides installing and setting up username and password? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted January 12, 2007 Share Posted January 12, 2007 No. It is to do with PHP having trouble loading up the MySQL extension.There may be older versions of the following files on your computer that may be causing this:- libmysql.dll- php_mysql.dllSearch your computer for these files. php_mysql.dll should be in PHP's ext folder and libmysql should be listed in C:\WINDOWS and in MySQLs bin folder.If the search finds any others rename these to something else, eg: libmysql.dll.bakRestart your server. Do you still get the error message? Also have you added PHP to the Windows PATH? Quote Link to comment Share on other sites More sharing options...
shermili Posted January 16, 2007 Author Share Posted January 16, 2007 yes i added the files to c:\windows and also my php is in c:\ path.but still same errorFatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\connect.php on line 2 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.