Call to undefined function oci_connect()
-
Background:
I already manage to connect to remote Oracle DB using latest Oracle SQL Developer. I don't have to download Instant Client to do that since from what I understand, all prerequisite have been bundled together.Now I'm trying to connect to the same DB from PHP running on Laragon Apache (Laragon Lite 4.0.15 190704 php-7.2.19-Win32-VC15-x64) but fail:
Call to undefined function oci_connect()
I tried to follow this guide https://forum.laragon.org/topic/607/tutorial-how-to-install-php-s-oracle-oci-extension but slightly different due to different result.
Here's what have I tried:
Case 1:
- Without downloading Instant Client, go to Laragon > PHP > Extensions, then click "oci8_12c"
- Laragon auto reload Apache
- Run the PHP got same error
- Run phpinfo cannot find like the guide's screenshot (oci8 section)
Case 2:
- I download Instant Client 64bit. Unzip and only copy all .dll files into C:\laragon\bin\php\php-7.2.19-Win32-VC15-x64\ext. Here're the files that I copied:
oraocci19d.dll
oraociicus19.dll
oraons.dll
orasql19.dll
oci.dll
ocijdbc19.dll
ociw32.dll
orannzsbb19.dll
oraocci19.dll
- Go to Laragon > PHP > Extensions, I can see new list:
oci
ocijdbc19
ociw32
orannzsbb19
oraocci19
oraocci19d
oraociicus19
oraons
- I tried to click on
oci
but nothing happen (it wont selected). - I click
oci8_12c
then Laragon auto reload Apache - Run the PHP got same error
- Run phpinfo cannot find like the guide's screenshot (oci8 section)
-
@coisox : F.Y.I:
https://forum.laragon.org/topic/607/tutorial-how-to-install-php-s-oracle-oci-extension
-
@leokhoa That's the exact tutorial I quoted in my post. The result is different