Call to undefined function mysql_connect()

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
aboonavas
Forum Newbie
Posts: 1
Joined: Fri Sep 23, 2005 6:49 pm
Contact:

Call to undefined function mysql_connect()

Post by aboonavas »

Whenever I try to connect to my MYSQL db, the following error is diplayed.

Call to undefined function mysql_connect() in h:\Inetpub\wwwroot\cart\includes\database\mysql.php on line 13


PHP is installed in my machine. Please advice ASAP.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Let me guess.. freshly installed PHP 5. PHP 5 does not come with MySQL built-in anymore. You will either need to modify your php.ini to load the module. If this is on a Windows machine and you installed via the installer, you need to download the full size zip and pull out the modules from it (at the least) to get them.
omega-systems
Forum Newbie
Posts: 14
Joined: Tue Sep 27, 2005 5:01 am
Contact:

Re: Call to undefined function mysql_connect()

Post by omega-systems »

Check all parameters of mysql_connect() function. mysql_connect(server, user, password), where server - MySQL server IP, username - name of the user that owns the MySQL server process and password - password of this user.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

incorrect arguments wouldn't create an undefined function situation.
Post Reply