[Phplib-commit] CVS: php-lib-stable/php db_oci8.inc,1.7,1.8
Brought to you by:
nhruby,
richardarcher
From: Layne W. <lay...@us...> - 2005-02-19 15:20:57
|
Update of /cvsroot/phplib/php-lib-stable/php In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6647/php Modified Files: db_oci8.inc Log Message: added var $Port for using $full_connection_string to connect on port other than 1521 Index: db_oci8.inc =================================================================== RCS file: /cvsroot/phplib/php-lib-stable/php/db_oci8.inc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** db_oci8.inc 17 Aug 2004 20:58:50 -0000 1.7 --- db_oci8.inc 19 Feb 2005 15:20:48 -0000 1.8 *************** *** 19,27 **** var $Host = ""; /* traditionally the full TNS name is placed in $Database; if having trouble with TNS resolution (and desiring a more legible configuration), place the host IP address in $Host and the Oracle SID in $Database as a shortcut - connect() will build a valid connection string using $full_connection_string */ var $Database = ""; var $User = ""; var $Password = ""; ! var $full_connection_string = "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=%s)(PORT=1521)))(CONNECT_DATA=(SID=%s)))"; var $Link_ID = 0; --- 19,28 ---- var $Host = ""; + var $Port = "1521"; /* traditionally the full TNS name is placed in $Database; if having trouble with TNS resolution (and desiring a more legible configuration), place the host IP address in $Host and the Oracle SID in $Database as a shortcut - connect() will build a valid connection string using $full_connection_string */ var $Database = ""; var $User = ""; var $Password = ""; ! var $full_connection_string = "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=%s)(PORT=%s)))(CONNECT_DATA=(SID=%s)))"; var $Link_ID = 0; *************** *** 74,78 **** } } ! $this->Link_ID = OCIPLogon($this->User, $this->Password, (($this->Host) ? sprintf($this->full_connection_string, $this->Host, $this->Database) : $this->Database)); if (!$this->Link_ID) { --- 75,79 ---- } } ! $this->Link_ID = OCIPLogon($this->User, $this->Password, (($this->Host) ? sprintf($this->full_connection_string, $this->Host, $this->Port, $this->Database) : $this->Database)); if (!$this->Link_ID) { |