RE: [PEAR] Re: MDB2 with oci8 DSN

From: Date: Fri, 26 Sep 2008 13:19:45 +0000
Subject: RE: [PEAR] Re: MDB2 with oci8 DSN
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-29301@lists.php.net to get a copy of this message
I'm getting: [Native message: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor] Using that last example you sent. Cheers Ryan -----Original Message----- From: Lorenzo Alberton [mailto:l.alberton@quipo.it] Sent: 26 September 2008 14:07 To: Ryan Taylor Cc: pear-general@lists.php.net Subject: Re: [PEAR] Re: MDB2 with oci8 DSN Ryan Taylor wrote: > No, still can't connect. what error are you getting? > You've got //localhost/XE in your example, how should my host be formatted? oci8://username:password@foo.example.com[:port]/?service=service try with $dsn = array ( 'phptype' => 'oci8', 'dbsyntax' => 'oci8', 'username' => 'USERNAME', 'password' => '***', 'hostspec' => 'MISSERVER.leeds-art.ac.uk', 'service' => 'STUDENTS', ); > Why is the array syntax safer btw? because it doesn't have to be parsed. The string DSN will be converted into an array anyway, so you can save a few CPU cycles if you already provide the parameters in an array. Cheers, -- Lorenzo Alberton http://pear.php.net/user/quipo ________________________________________________________________________ Quipo Free Internet: sicuro e veloce senza costi di attivazione e senza canone, 2 e-mail da 50 Mb, 150 Mb di spazio web e molto di più! Registrati gratis: http://www.quipo.it

« previous php.pear.general (#29301) next »