9
AleCx04
5y

Situation:

Php not loading oci8 connector for oracle database in windows server, got the all famous and feated oci_connect unknown function error.

Solution:
Check to make sure that the stupid dll is in the extensions folder ---> check

Check to make sure that the extension_dir path is done properly inside php.ini ---> check

Ensure that extension=php_oci8_11g.dll is inside php.ini ---> check

I have no fucking clue why this piece of shit would stop working all out of the sudden and would not fucking work. But here i am yet AGAIN trying to fix something for the fucking web tech department because their fucking lead dev is out.

I
Fucking
HATE

Having to deal with php configurations. Such a fucking pain in the fucking ass man.

FUUUUCKING WOOOOOORK

Comments
  • 5
    Yay php and Windows.....
    Really? On windows?
    🤷‍♂️ some companies like to be tortured.

    .. wait, that wasn't a "windows shit, php shit" moment, I've just never enjoyed that combination.

    Did you restart Apache/nginx/iis or which ever you're using?

    Have you started the oracle database service -> so many people miss this step.

    Can you connect outside of php?
  • 2
    @C0D4 i have no clue why the other retard opted for this shit.
    Yes we can connect to oracle from other services. You know the php --ini cli command? It literally tells me that it cannot find the oci8 module especified in the .ini file
  • 3
    @AleCx04 this be unusual.
    Unless there's another .ini file...

    The dll is in path\to\php\ext\ ?
    I suspect it will be but you know....

    If you downloaded the dll, check it doesn't have the blocked tickbox in properties.

    Outside of that.... well nope that should actually work 🙁
  • 2
    @C0D4 i have tried literally everything man.

    Imagine trying to read a file from a location, you have everything correct and it still not fucking works. That is literally the issue. I fucking hate this
  • 0
    Did you install correct version of instantclient? If ypu have 32bit php, you need 32bit both oci and instantclient.
  • 1
    @lamka02sk yeah i inow, yeah i did
  • 1
    @C0D4 PHP/IIS/Win setups are actually pretty straight forward with the PHP Manager for IIS extension.
  • 1
    @kwilliams it's been a long time since I used a windows server for php.

    I gave up when having to deal with back vs forward lashes for paths and some functions having different behaviours between Linux and windows, file_get_contents() for one.

    Now that's not to say I don't use windows for local dev, but any running of that code is strictly within a LAMP stack, 99% of the time a VM but some systems will be prod only 🤷‍♂️

    Nothing like testing in production.... am I right?

    But having used windows in the past, it's a good thing to know the differences in the event you have to deploy to that environment.
Add Comment