supergrover1981 Posted November 26, 2006 Share Posted November 26, 2006 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:[code] $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)); } ?>[/code]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 machineAny suggestions would be really, truly appreciated - I'm quite stumped. Connection code attached below. :-)Many thanks,- JB[code] 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)); } ?>[/code] Link to comment https://forums.phpfreaks.com/topic/28504-pear-mdb2-connection-problems-all-help-appreciated/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.