Jump to content

Recommended Posts

I'm having a problem with a PHP script that's trying to connect to a MySQL database.  This script works perfectly in OS X, but when I run it in Kubuntu, I get the following error:

Fatal error: Call to undefined function mysql_connect() in /var/www/Sites/LP2/dbc.php on line 2.  The script is as follows:

 

<?php
$mysql = mysql_connect('127.0.0.1', 'peterv', 'password');
if (mysql_connect_errno()) {
   printf("Connect failed: %s\n", mysql_connect_errno());
   exit();
} else {
   printf("Host information: %s\n", mysql_get_host_information($mysql));
}
?>

 

I'm assuming it has something to do with my PHP installation, but I'm a relative newbie to this.  Any help or suggestions will be GREATLY appreciated.

PETERV

MySQL version - 5.1.41-3ubuntu12.10 (Ubuntu)

 

What do you mean by "child" board?  I did a search for mysql_connect() prior to posting, and found nothing relevant.  I'd much rather follow a successful prior post than to post something redundantly.

fenway,

Thanks for the link, but it refers to the resolution of the problems on a Windows system, and I'm running Kubuntu Linux.  I'll see if I can find the correct directory for that, and post it here if I can find it.  (If you know which it is, please post it.)  Thanks again.

Peter V.

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.