oci8.php Error

From: Date: Tue, 24 Sep 2002 06:28:46 +0000
Subject: oci8.php Error
Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-147@lists.php.net to get a copy of this message
Hi, My name is Bond. I try to use the pear-DB to make connection to Oracle 9i and in the starting, everything seems that cant work until I make the following chances. Please refer to oci8.php for referrence. $user = $dsninfo['username']; $pw = $dsninfo['password']; $hostspec = $dsninfo['hostspec']; $dbdata = $dsninfo['database']; //manually added $desc = "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=".$hostspec.")(PORT=".$dsninfo['port']."))(CONNECT_DATA=(SERVICE_NAME=".$dbdata.".".$hostspec.")))"; //manually added $connect_function = $persistent ? 'OCIPLogon' : 'OCILogon'; //following code I commented /* if ($hostspec) { $conn = @$connect_function($user,$pw,$hostspec); } elseif ($user || $pw) { $conn = @$connect_function($user,$pw); } else { $conn = false; } */ //this is the new code I added in if (isset($dbdata)){ $conn = @$connect_function($user,$pw,$desc); } It is funny that I cant use the Service Naming that created in tnsnames.ora located in $ORACLE_HOME/metwork/admin in internet, but have to use the description. In intranet, I can use the service naming So, I want to ask is there any solved method for this in pear-DB Oracle classess or newer and updated version classess? p/s:Currently, I am using php-4.2.3 Thank You! ** Please use my new email address bond@skali.net ** Bond Lim Khey Eng, Web Programmer * mobile 013-3880752 : phone 03-8656 8468(EXT: 813) : fax 03-8656 8458 * http://SKALI.net creates new value and opportunities for organisations * E-Business is about Business http://about.skali.net IMPORTANT: This e-mail (including any attachment hereto) is intended solely for the addressee and is confidential and privileged. If this should have been sent to you in error, you are not to reproduce, distribute or take any action in reliance on it. Kindly notify us and delete the e-mail and all attachments immediately. As e-mail and/or attachments may contain viruses and other interfering or damaging elements, the receipt and/or downloading of e-mail and/or attachments will be at your own risk.

« previous php.pear.webmaster (#147) next »