Hi Guys,
I've been using pear on my local machine for the last two weeks or so without any problems - I've just tried to migrate some stuff to a remote (shared) server for the first time, and I'm having a bit of a problem.
I'm trying to connect via MDB2, using the following:
$connection = MDB2::connect("mysql://$db_username:$db_password@$db_host/$db_database");
if (MDB2::isError($connection)) {
die ("Could not connect to the database: <br />".MDB2::errorMessage($connection));
}
?>
which is always met with the dreaded: "Could not connect to the database: not found" error.
However:
- I can connect using the same login details via the non-pear mysql_connect call
- I can connect via MDB2 on my local machine using the same mdb2 code
- I've looked via pear remote-list and MDB2 is installed on the remote machine
Any suggestions would be really, truly appreciated - I'm quite stumped. Connection code attached below. :-)
Many thanks,
- JB
php:$db_username='tempscou_testconn';
$db_password='conntest';
$db_host='localhost';
$db_database='tempscou_jts';
require_once('MDB2.php');
$connection = MDB2::connect("mysql://$db_username:$db_password@$db_host/$db_database");
if (MDB2::isError($connection)) {
die ("FROG1Could not connect to the database: <br />".MDB2::errorMessage($connection));
}
?>