DSN hostspec problem
| From: | Roger Spears | Date: | Fri, 16 Apr 2004 19:14:15 +0000 |
| Subject: | DSN hostspec problem | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-11921@lists.php.net to get a copy of this message | ||
Hello,
We moved our database from development to production today. While in development, my connection used an alias for its hostspec. For production, we are to use a URL instead of the alias. Upon plugging in the new information for our production connection string, it produces a 'call to undefined function' error after trying to connect.
The new connection string looks like this:
$dsn = "$db_type://$user:$pass@db.someServer.com";
$db = DB::connect($dsn);
if (DB::isError($db))
{
$db->disconnect(); // this line contains error according to logs
I'm guessing the error is because of no connection or becuase it can't find the proper machine. Is there another way to code a connection string when it contains an actual URL instead of an alias?
Thanks,
Rog