Web lists-archives.com

RES: [PHP] Error ORA-12557 When connecting to Oracle ( SOLVED )




Hi :

 

Problem solved

 

I find this in the ORACLE docs:

http://www.oracle.com/technetwork/articles/technote-php-instant-084410.html

 

Problem, Instant client instaled, but this folder was not in the path.

 

Path change, php can connect to Oracle.

 

 

 

De: Alejandro Michelin Salomon (HOTMAIL) [mailto:amichelins@xxxxxxxxxxx] 
Enviada em: sábado, 19 de dezembro de 2015 14:36
Para: 'php-general@xxxxxxxxxxxxx'
Assunto: [PHP] Error ORA-12557 When connecting to Oracle

 

Hi :

 

I am using PHP 5.6.11  x64 in Windows 8.1  na APACHE 2.4.x

 

I a have problem with this code :

 

<?php

$conn = oci_connect('sri', '23wq@34.t', '127.0.0.1/orcl');

 

if (!$conn) 

{

    $e = oci_error();

    trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);

}

 

?>

The erro is :

Warning: oci_connect(): in D:\webroot\pdo.php on line 2

Fatal error: ORA-12557: TNS:adaptador de protocolo não carregável in
D:\webroot\pdo.php on line 5

 

Code with PDO_Oci  has the same problem.

 

I check my oracle connection with :

 

1)      TNSPING

Result OK

2)      SqlDevelopper 

Result OK  I make some querys whithout errors

 

Phpinfo()   information  says that OCI and PDO OCI  are instaled

oci8


OCI8 Support 

enabled 


OCI8 DTrace Support 

disabled 


OCI8 Version 

2.0.8 


Revision 

$Id: f04114d4d67cffea4cdc2ed3b7f0229c2caa5016 $ 


Oracle Run-time Client Library Version 

11.2.0.1.0 


Oracle Compile-time Instant Client Version 

11.2 

 


PDO Driver for OCI 8 and later

                 enabled

 

?--with-pdo-oci=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared" 

"--with-oci8-12c=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared"

 

What is brong with my instalation?

 

Alejandro M.S

e-mail:  <mailto:everton.corso@xxxxxxxxx> amichelins @hotmail.com

skype:  <mailto:everton.corso@xxxxxxxxx> amichelins @hotmail.com