| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2008-07-08 09:40 UTC] j dot kaluza at redcross-transfusion dot be
 Description:
------------
Hello,
While trying to connect to Oracle database with PDO_OCI, i get ORA error following : 
ORA-12533:TNS:illegal ADDRESS parameters
If i modify the TNS identifier in the source code (index dbname of $params array) nothing change, even if the tns i use doesn't exist. With Oracle software, it works, it will work also with oci8 package
Reproduce code:
---------------
$options = array ( Zend_Db::CASE_FOLDING => Zend_Db::CASE_UPPER);
$params = array ('username' => 'myuser', 
		'password' => 'mypass',
		'dbname'      => 'TEST1_SFSORAA1',
		'options'  => $options);
try{			
  $db = Zend_Db::factory("PDO_OCI",$params);
  $db->getConnection();
  return $db;
}catch(Zend_Db_Adapter_Exception $e){
	echo $e->getMessage();
}
Expected result:
----------------
successfull logon
Actual result:
--------------
logon faailure due to TNS problem
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 11:00:01 2025 UTC | 
tnsnames.ora contents : TEST1_SFSORAA1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = sfsoraa1)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = test) (INSTANCE_NAME = test1) ) (HS = OK) ) SFSWEB02.CRBSFS.LOCAL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = sfsweb02.crb-sfs.local)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = web02prd.crbsfs.local) ) )