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? Link to comment https://forums.phpfreaks.com/topic/33662-help-with-mysql-and-php/ 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. Link to comment https://forums.phpfreaks.com/topic/33662-help-with-mysql-and-php/#findComment-157895 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 Link to comment https://forums.phpfreaks.com/topic/33662-help-with-mysql-and-php/#findComment-158272 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. Link to comment https://forums.phpfreaks.com/topic/33662-help-with-mysql-and-php/#findComment-158480 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 Link to comment https://forums.phpfreaks.com/topic/33662-help-with-mysql-and-php/#findComment-158523 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? Link to comment https://forums.phpfreaks.com/topic/33662-help-with-mysql-and-php/#findComment-158528 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? Link to comment https://forums.phpfreaks.com/topic/33662-help-with-mysql-and-php/#findComment-159283 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 Link to comment https://forums.phpfreaks.com/topic/33662-help-with-mysql-and-php/#findComment-161996 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.