By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,903 Members | 2,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,903 IT Pros & Developers. It's quick & easy.

OCI8/oracle DLL HELL --

P: n/a
Hi,
I had just a horrible day at work, spent pretty much the entire day
trying to get php_oci.dll and php_oracle.dll to load. It still never
did.

Super Quick Background.
Jack of all trades IT guy, have written many tools using perl and JSP
in the past.
Had a chance to do a big project, and figured I would use it to learn
PHP.
Did all development on my XP Pro station, they bought a windows 2003
Small Business Server to run the application on.
99% of the application is powered by MQSQL
Using XAMPP distrabution.

Make ONE call on ONE page to a legacy oracle database we have (8)...
Works FINE on my machine.

Ported everything to the server. NO DICE enabling php_oci8.dll and
php_oracle.dll
PHP is 5.5.1.

DL'ed instant client. Pulled the three dll's I am supposed to out, put
them in C:\instantclient
Added C:\instantclient to class path:

Error loading dll, procedure not found (note: not module... It's
finding the oci and oracle dll in the /ext directory)...

I think it's more an oracle driver/dll/something I can't figure out
problem.
I've spent a whole day googling things, trying to change this classpath
and that class path, adding something71.dll and somethingelse71.dll
(forgive me, I'm at home now and can't remember exactly)...

But absolutely nothing worked.

Does anyone know the secret to what I need to install on the server to
get these babies to run? It's making me feel like a fool having spent
all day working on something that really should be simple.

If I need to install some other oracle "client software" can anyone
tell me specifically what it is I need other then instant client? I ask
that because I've seen three dozen refreances to a vague "oracle client
software"

I could go on, but I'm just venting now...
Please, any pointers to what the heck I need would be SO SO SO
appreciated.
Kind Regards,
ds

Feb 6 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
DravenStone wrote:
Ported everything to the server. NO DICE enabling php_oci8.dll and
php_oracle.dll
PHP is 5.5.1.


You mean 5.1.1?

I have a bit of oracle & php experience, but only on *nix. However, I
hate to see a fellow odd job man struggling, so I'll try and help.

Try replacing your php_oci8.dll with the one corresponding to your php
version here:

http://pecl4win.php.net/ext.php/php_oci8.dll

Dump the php_oracle.dll completely if you can. You should need the
full-blown Oracle client for that anyway, it won't work with the
instantclient (as I recall). The Oracle extension is highly deprecated
in favour of the oci8 extension.

Talking of the big fat Oracle client, you can download it from here if
you need it:

http://www.oracle.com/technology/sof...10g/index.html

Good luck,
Gareth
Feb 7 '06 #2

P: n/a
Yeah, 5.1.1 doing everything from (not so sharp) memory now that I'm
home and trying to stop being annoyed.

Much thanks for your links, I'll try both straight away in the morning.

With regards to the oracle client -- do you find/believe that it in
fact a necessary component to get oci to work with PHP under windows?

-ds

Feb 7 '06 #3

P: n/a
Oh and one more piece of pseudo interesting information...

The XAMPP dist. installs adodb as well.

I found that it works fine on the development machine to make a test
connection using that library to my oracle server, but again, that does
not work on the new (soon to be) production machine... Thinking that
this just goes to help support my theory that it's a windows/oracle
issue more so then a PHP one.

However, that doesn't discount my new interest in trying an updated
version of the oci8.dll from Gareth's post, since I can tell it's a
newer build for 1.1 then was packaged with XAMPP

more thanks,
-ds

Feb 7 '06 #4

P: n/a
On 6 Feb 2006 15:15:23 -0800, "DravenStone" <ch********@gmail.com> wrote:
I had just a horrible day at work, spent pretty much the entire day
trying to get php_oci.dll
What is php_oci.dll? Do you mean php_oci8.dll?
and php_oracle.dll to load.
Forget php_oracle.dll, that's for Oracle 7.
Make ONE call on ONE page to a legacy oracle database we have (8)...
Works FINE on my machine.

Ported everything to the server. NO DICE enabling php_oci8.dll and
php_oracle.dll
PHP is 5.5.1.
What version is it really?

Not that it should actually make any difference in terms of getting it going
in the first place, but 5.1.2 comes with a considerably updated version of the
OCI8 extension with lots of bug fixes and some new features (persistent
connection pinging and timeouts, for example).
DL'ed instant client. Pulled the three dll's I am supposed to out, put
them in C:\instantclient
Unpack all of the instant client zip rather than picking and choosing, unless
you really know what you're doing.
Added C:\instantclient to class path:
Class path is Java, do you mean PATH?
Error loading dll, procedure not found (note: not module... It's
finding the oci and oracle dll in the /ext directory)...
Which of the two PHP extensions were you trying to load at this point?
I think it's more an oracle driver/dll/something I can't figure out
problem.
I've spent a whole day googling things, trying to change this classpath
and that class path, adding something71.dll and somethingelse71.dll
(forgive me, I'm at home now and can't remember exactly)...

But absolutely nothing worked.


Hacking around isn't going to help and will just get you into more of a mess
since you won't know how to undo it. There's a just a few steps you have to do
to get Oracle PHP support working, but it's not at all forgiving to messing
around. Were you following any particular instructions, such as:
http://www.oracle.com/technology/pub...p_instant.html ?

I see there it mentions unzipping just three of the Instant Client DLLs, well,
I suppose that's on an Oracle site so they should know which ones are needed,
but it makes sense to unpack the lot.

The usual snag I hit on Windows is getting the updated environment variables
into the web server process - remember that if you just restart it, it may not
see the new environment. If you open a new command window after changing the
environment variable, then use "net stop apache2" and "net start apache2" then
it's more likely to pick up the change. (Or reboot)

The other one is permissions; make sure the web server user has permissions to
access all the libraries and files involved. That's usually an issue with the
full client install that locks down permissions by default, rather than the
instant client.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Feb 7 '06 #5

P: n/a

What is php_oci.dll? Do you mean php_oci8.dll?

Of course... sorry, I reference it properly three other times in the
post...
and php_oracle.dll to load.
Forget php_oracle.dll, that's for Oracle 7.

Agreed...

Make ONE call on ONE page to a legacy oracle database we have (8)...
Works FINE on my machine. Ported everything to the server. NO DICE enabling php_oci8.dll and
php_oracle.dll
PHP is 5.5.1.
What version is it really?

5.1.1, which I clarafied in an earlier response, sorry...

Not that it should actually make any difference in terms of getting it
going
in the first place, but 5.1.2 comes with a considerably updated version
of the
OCI8 extension with lots of bug fixes and some new features (persistent
connection pinging and timeouts, for example).

Yup, I read all about that today, but I'm not running 5.1.2...
DL'ed instant client. Pulled the three dll's I am supposed to out, put
them in C:\instantclient
Unpack all of the instant client zip rather than picking and choosing,
unless
you really know what you're doing.

I've tried that as well... I tried everything I could think of...
Added C:\instantclient to class path:
Class path is Java, do you mean PATH?

Yes, I mean path. Sorry, like I said, I'm a jack of all trades, master
of none kind of guy and I have done a lot of JSP stuff so I've got java
on the brain... (Plus I wrote this when I got HOME from work and was
already brain fried)...
Error loading dll, procedure not found (note: not module... It's
finding the oci and oracle dll in the /ext directory)...
Which of the two PHP extensions were you trying to load at this point?

oci8 and oracle (both of which I load fine on my other machine)
I think it's more an oracle driver/dll/something I can't figure out
problem.
I've spent a whole day googling things, trying to change this classpath
and that class path, adding something71.dll and somethingelse71.dll
(forgive me, I'm at home now and can't remember exactly)... But absolutely nothing worked.


Hacking around isn't going to help and will just get you into more of
a mess
since you won't know how to undo it. There's a just a few steps you
have to do
to get Oracle PHP support working, but it's not at all forgiving to
messing
around. Were you following any particular instructions, such as:
http://www.oracle.com/technology/pub...p_instant.html ?

I followed those exactly. Further, I had followed those exactly on my
other machine and it worked in two minutes as it should... hence my
amazingly high level of frustration.

I see there it mentions unzipping just three of the Instant Client
DLLs, well,
I suppose that's on an Oracle site so they should know which ones are
needed,
but it makes sense to unpack the lot.

Again, I tried that, no help.

The usual snag I hit on Windows is getting the updated environment
variables
into the web server process - remember that if you just restart it, it
may not
see the new environment. If you open a new command window after
changing the
environment variable, then use "net stop apache2" and "net start
apache2" then
it's more likely to pick up the change. (Or reboot)

Multiple times I restarted apache using a variety of methods AND
rebooted...

The other one is permissions; make sure the web server user has
permissions to
access all the libraries and files involved. That's usually an issue
with the
full client install that locks down permissions by default, rather than
the
instant client.

Was logged in as administrator all day, XAMPP was installed as admin as
well.

Feb 7 '06 #6

P: n/a
If anyone cares...
I blew away 2003 small business server, and installed 2K advanced
server, and boom... everything worked fine in under 10 minutes...

Feb 7 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.