Call to undefined function oci_connect()


  • | 431 points

    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:

    1. Without downloading Instant Client, go to Laragon > PHP > Extensions, then click "oci8_12c"
    2. Laragon auto reload Apache
    3. Run the PHP got same error
    4. Run phpinfo cannot find like the guide's screenshot (oci8 section)

    Case 2:

    1. 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
    2. Go to Laragon > PHP > Extensions, I can see new list:
      oci
      ocijdbc19
      ociw32
      orannzsbb19
      oraocci19
      oraocci19d
      oraociicus19
      oraons
    3. I tried to click on oci but nothing happen (it wont selected).
    4. I click oci8_12c then Laragon auto reload Apache
    5. Run the PHP got same error
    6. Run phpinfo cannot find like the guide's screenshot (oci8 section)

  • administrators
    | 123470 points


  • | 431 points

    @leokhoa That's the exact tutorial I quoted in my post. The result is different


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.