Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call to undefined function: mysql_connect()

Status
Not open for further replies.

newphpbie

Programmer
Oct 17, 2003
110
GB
This is really silly. I've just migrated onto another linux box and I'm trying to get my program working again.

I have a function called connectfunct2()

It's telling me

Fatal error: Call to undefined function: mysql_connect() in /var/ on line 5

Line 5 is this...
Code:
$db=mysql_connect("localhost","","")or Die("Can't connect :" .mysql_error());

I'm boggled because I thought it would show me the "Can't connect :" error message if the location, username and password were incorrect? I'm sure the connecting parameters are correct, so why else would it say that it's an undefined varable?

Can anyone give me some clues please.....

Tony
 
Hi Tony. What a common problem you have. If you looked carefully(in the right place) you'd proberbly find loads of posts to the same question.

It's proberbly got something to do with you not installing MySQL properly, make sure PHP is configured with MySQL else you'll get that exact error message.

Good luck with the rest of your day.

Tony
 
Thanks for the swift reply Tony.

Next time I shall take more time to research the problem before I post a question.

My apologies for wasting valuable question space.

Tony
 
It's always nice to see another schizophrenic Tek-Tips user! :)

//Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top