fatal error oci_connect

0

Hello, I'm starting my studies in this area, sorry if you ask some nonsense question !!

I have an oracle database that is in a virtual machine, and I'm doing a university job and I would like to connect this web system to this bank .. so my doubts, do I need to install some application on the physical machine? because I'm doing my php code as follows:

$ora_senha="1234";

$oracle_bd="(DESCRIPTION=
                (ADDRESS_LIST=
                    (ADDRESS=(PROTOCOL=TCP)
                        (HOST=10.0.0.10)(PORT=1521)
                )
            )
            (CONNECT_DATA=(SERVICE_NAME=teste))
            )";

if ($ora_conexao = oci_connect( $ora_usuario, $ora_senha, oracle_bd) ){
    echo "conexão com o banco oracle foi feita com sucesso";
} 
else
  echo "erro na conexão com o banco";
?>

but oci_connect (); does not connect in any way always gives the following error:

  

"Fatal error: Call to undefined function oci_connect () in"

I already did everything, uncommented the extensions in php.ini already downloaded the file instantclient but always of that error !! Someone please have one. Thanks in advance for your help!

    
asked by anonymous 24.07.2018 / 17:14

1 answer

0

Good after searching a lot, I can solve this error, I leave the answer to someone who may have the same problem, remembering that for there are several steps to be done but I will leave only the solution of the persistence of the error after having configured all the files ... I solved this problem by copying an "oci.dll" dll that is inside the "instant client" folder, and it plays inside the binn apache folder of your server !! ..

    
25.07.2018 / 05:04