Jump to content

php -> mysql connection error


Evanthes

Recommended Posts

Hey guys ive been developing a program on my local machiene thats works great, however now im moving it to our webserver and am having some problems. I've duplicated everything on the server with the exception of the port that mysql runs on. and now i am getting the following error:
Fatal error: Call to undefined function mysql_connect() in C:\Inetpub\wwwroot\cp\opendb.php on line 3

here is my db connection code
[code]
//opendb.php
$conn = mysql_connect($dbhost, $dbuser, $dbpass) or die                      ('Error connecting to mysql');
mysql_select_db($dbname);
[/code]

i guess I'm just wondering why the php in the statement isnt being processed and its giving me the mysql error instead of "error connecting to mysql" like it should say in the code.
the server is a 2k server running IIS, if that might have anything to do with it. thanks for your help!
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.