Web lists-archives.com

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

Hi :


Problem solved


I find this in the ORACLE docs:



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 :



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


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 Support 


OCI8 DTrace Support 


OCI8 Version 



$Id: f04114d4d67cffea4cdc2ed3b7f0229c2caa5016 $ 

Oracle Run-time Client Library Version 

Oracle Compile-time Instant Client Version 



PDO Driver for OCI 8 and later






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