note 39933 added to function.ocilogon

From: Date: Mon, 16 Feb 2004 06:06:18 +0000
Subject: note 39933 added to function.ocilogon
Groups: php.notes 
Request: Send a blank email to php-notes+get-65200@lists.php.net to get a copy of this message
If PHP is linked with Oracle 10g (or later) client libraries, the Easy Connection syntax can be used to identify which database to connect to. This can remove the need for a local tnsnames.ora file or complex connect string. The new syntax can be used to connect to earlier versions of Oracle. With Oracle 10g client libraries, the third parameter "db" for OCILogon can have the syntax: [//]host[:port][/service_name] An example is: $c = OCILogon('scott', 'tiger', '//mymachine.mydomain/mydbservice'); The pre-10g syntax equivalent is something like: $c = OCILogon('scott', 'tiger', '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP) (HOST=mymachine.mydomain) (PORT=1521))) (CONNECT_DATA=(SERVICE_NAME=MYDBSERVICE)))'); The full syntax continues to work with 10g. It allows for more complex configuration than available with the Easy Connect method. Oracle documentation and the fine print for Easy Connect is at: http://download-west.oracle.com/docs/cd/B12037_01/network.101/ b10775/naming.htm#i498306 (note the split URL due to PHP doc site limitations needs to be recombined for use) ---- Manual Page -- http://www.php.net/manual/en/function.ocilogon.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39933 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39933&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39933&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#65200) next »