OCI_INVALID_HANDLE (ext\pdo_oci\oci_driver.c:579)

In my project, I need to pull data from Oracle Server.
I need to enable oci8 and PDO_OCI extensions but there is a problem since PHP couldn't find OCI.dll.
I had downloaded the oracle Instant Client, extract and copy the oci.dll file to windows folder and successfully enable the extension. But when I tried to connect to the server, PHP gave me this error message:

OCI_INVALID_HANDLE (ext\pdo_oci\oci_driver.c:579)

So, I take a look on oracle Instant Client installation manual. Actually, it's very simple solution.

How to solve :
  1. Set the variable ORACLE_HOME in the Windows environment setting  to the path of the extracted Oracle Instant Client folder.
  2. Restart Apache
It works.

0 comments:

 
Copyright © peyotest