Page 1 of 1

OCI.DLL doesn't work via php_oci8 <<<< SOLVED!!!!

Posted: Mon Sep 07, 2009 11:19 am
by roydude
HEEEELP - I've just wasted an entire day in the office trying to stop this from happening and I'm in exactly the place I was this morning! I've searched forums / the whole world of Google and anywhere else I can think of but to no avail.

The problem: I had a successful installation of PHP5.1.5 running, using PECL 5.1.5 to access our Oracle8i databases. I'm now migrating the php code across to use the Oracle 10g databases, so I've installed PHP5.2.8 (using the MSI installer), and PECL 5.2.6, with the extension "php_oci8.dll" uncommented in PHP.INI.
When I run the "php.exe" from the command line (so I don't need to worry about Apache / IIS / whatever other webserver) I immediately get this:

"The procedure entry point OCILobRead2 could not be located in the dynamic link library OCI.dll"

... which only stops happening if I comment out the "php_oci8" line in PHP.INI.

I have Oracle 10g on my machine (it works fine with SQLPlus / TOAD etc...), I've tried putting the OCI.DLL from 10g into the PHP directory. I've tried adding the 10g/bin path to the windows PATH variable. I've tried removing PHP 5.2.8 and putting 5.2.6 in instead. I've tried pretty much any combination of anything I can think of and at the end of an entire day I've gained absolutely zero ground here!

I'm surely not the first person in history to come across this - if anyone can even give me any kind of hint as to what I might need to do here I'd be massively grateful!

Re: "OCILobRead2" error from php_oci8 after installation.

Posted: Tue Sep 08, 2009 8:44 am
by roydude
Nobody? 8O

Even somewhere to start be help - I'm actually at the point of looking through the code for php_oci8.dll to try and figure out where / how it calls OCILobread2!

Re: "OCILobRead2" error from php_oci8 after installation.

Posted: Tue Sep 08, 2009 9:20 am
by roydude
Okay so I'm still crawling around in the binary and splashing around the muddy hugeness of Google, and I just came across a forum where someone suggests php_oci8.dll is not compatible with OCI that comes with Oracle 10/11!!!! I thought that was the whole point of OCI8!!! :banghead:

Does anyone know if that's correct?

I had no-end of problems getting to the bottom of which version of php was compatible with Oracle8i when I first started all this, now I'm migrating it to use Oracle10g I could be facing the same issues all over again! Why is it so difficult to get a clear answer to which version of PHP/PECL to use with which version of Oracle???? :dubious:

So to cut a long story short - if no-one can answer the initial question, can someone just at least please tell me exactly which version of PHP and PECL I should install to use with Oracle 10g on a Windows XP platform?

... couldn't find a :begging: smiley, but if there was one, I'd be using it! ...

Re: "OCILobRead2" error from php_oci8 after installation.

Posted: Tue Sep 08, 2009 12:24 pm
by roydude
End of day 2 - 17 hours of trawling through forums, manuals, on-line help, experimenting, eliminating possibilities and frankly, guessing, and I'm still in exactly the same position I was at the start! :(

I've now installed php5.3 on here - still exactly the same problem with the OCI.DLL. Even Dependency Walker doesn't help (shows me there's a problem with a missing export function in an implicitly dependent module, but doesn't tell me which module it's failing to load, just what the function is). MSN = no help at all.

It's not even a 10g dependency - I just get a different error when I try to use the 8i OCI.DLL.

Does nobody out there have any idea at all???? Am I seriously the only person who's ever encountered this?

The only conclusion I can make at this point is that php_oci8.dll simply does not work on XP!

Re: "OCILobRead2" error from php_oci8 after installation.

Posted: Thu Sep 10, 2009 8:44 am
by roydude
4 days on - there's now two of us (including my boss!) trawling through forums / help pages / anything at all that might give any clue here and apparently 61 people have viewed this post with no replies at all! :cry: :( :cry:

Having given up on getting an answer to making php work on 10g oracle on windows xp, I'll give props and kudos to any human on earth who can at least tell me what version of PHP and php_oci8.dll I need to run with Oracle 10g on Windows XP. :?: 8O :?:

I'm trying to run "php.exe" from a DOS command prompt and I have the following on this PC:
- Oracle 10 client.
- Windows XP pro.
- IIS 5.1

... all of which work for other things. I've also tried PHP 5.2.6, 5.2.8 and 5.3.0. with no luck at all when oci8 is uncommented. The only change to the original message I started this thread with is that now I just get a popup window saying "The procedure entry point OCIStmtPrepare2 could not be located in the dynamic link library OCI.dll".

I don't actually care about any of the hot new functionality OCI_ has over ORA_, I just need to communicate with a 10g database (if that's possible without oci8 then I'll even settle for that as an anwswer!).

Re: OCI.DLL doesn't work via php_oci8 <<<< SOLVED!!!!

Posted: Fri Sep 11, 2009 4:27 am
by roydude
Well, after around 40 man-hours of trawling through websites / forums etc... someone finally came across an article that suggested earlier versions of the Oracle 10g client wouldn't work with php_oci8 (a kinda important piece of information wouldn't you think??).

Anyway, here's what we did :

- Installed PHP 5.2.8 (with php_oci8.dll extension uncommented in PHP.INI)
- Installed Oracle instant client (which is actually Oracle 11).

... and that's it!!! No more complaints from the stupidly named oci8 dll!!

(Note: This problem has nothing to do with IIS at all since we were running it from the command line - the pc we finally got this working on doesn't even have a web server on it)!

So please note: It's not enough to have an oracle 10g client installed, it must be the right version of the 10g client!!

Now we're hoping we can still connect to the 10g databases using the 11g client (else we're going to have to mess around finding a newer 10g client).

Re: OCI.DLL doesn't work via php_oci8 <<<< SOLVED!!!!

Posted: Fri Sep 05, 2014 3:01 am
by danmac
Dear people

Apologies, I know this is an old thread, however.....

Just to add to what already been shared, the oci.dll issue was the cause of these dreaded errors (even a simple php_info() call):

mod_fcgid: get overlap result error
end of script output before headers

when i commented out the oci8 module in php.ini my php_info() works perfectly

The issue I had was due to the fact that I was working on a server with an "%oracle_home%" pointing to client files for 11g, however I wish to connect to a 10GR2 instance.

running php -i from the command line will generate a more detailed error "The procedure entry point OCILobRead2 could not be located in the dynamic link library OCI.dll"

Now the tricky part....since I cannot change my servers oracle home due to dependencies with other applications i needed to drop the correct oci.dll (10GR2 version) into the root directory of my php installation (for me C:\php) to force php to ignore the oci.dll in %oracle_home%

Now php_info displays correctly.

Thanks