Re: DSN hostspec problem
| From: | Roger Spears | Date: | Sun, 18 Apr 2004 20:32:19 +0000 |
| Subject: | Re: DSN hostspec problem | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11943@lists.php.net to get a copy of this message | ||
Robert Munteanu wrote:
Hello, Roger First of all, don't call $db->disconnect() on error, because the $db is a PEAR_Error and does not have the disconnect method. Please see http://pear.php.net/manual/en/package.database.db.intro-connect.php for the recommended way to handle an error.Thank you. I didn't realize this.
Second of all, there should be a database part in the DSN. You can find a complete documentation of it here : http://pear.php.net/manual/en/package.database.db.intro-dsn.phpOk, I've adjusted my code and now I have this: $user = myUsername; // set to my user name $pass = myPassword; // set to my password $host = db5.portalDomainName.com; // this is the hostspec $dbname = myDB; // the name of my database $dsn = "oci8://$user:$pass@$host/$db_name"; It's still giving me the TNS error. I've tried just connection to the database without actually connecting to a specific table, and same thing, I get a TNS error. ocilogon(): _oci_open_server: ORA-12154: TNS:could not resolve service name Any further suggestions? TIA, Roger