Page 1 of 1

undefined function mysql_connect()

Posted: Wed Jul 26, 2006 10:49 am
by sivasyam
Pimptastic | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


hi all,

i run this programe

Code: Select all

<?php
$con = mysql_connect("localhost:3306","root","bisro");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
?>
on browser

then its display's the follwing error

Fatal error: Call to undefined function mysql_connect() in C:\bisro\examples\conn1.php on line 5

pls


Pimptastic | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Wed Jul 26, 2006 11:22 am
by Ward
You need to install the MySQL extension on your server.

Posted: Wed Jul 26, 2006 11:27 am
by Luke
you running your own server or are you on a shared server (hosting company) :?:

Posted: Wed Jul 26, 2006 11:34 am
by sivasyam
i using my own server

Posted: Wed Jul 26, 2006 11:38 am
by RobertGonzalez
You need to edit your php.ini to uncomment the php_mysql.dll line in the extensions section. I'd bet if you searched these forums you'd find the exact entry you need to make/edit.

HINT: Use the Search feature of these boards and serach for 'mysql extension', choose the 'Search for all terms' Option and enter 'Everah' as the author name. There are 9 results that will answer your question.

Or, just remove the semicolon from this line in php.ini...

Code: Select all

;extension=php_mysql.dll