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

PHP and Oracle 9.xi - Please Somebody HELP ME!!

P: n/a
Hi,

I'm desperate...

I've been installed Oracle Client. 9.1i in some computers and 9.2i in
others. The installation was sucefull, because, I can use SQL Plus,
without problems...

Now I'm trying to connect, PHP with Oracle, and I'm experimented to
diferents problems:

1) When I start PHP, I get the error message: 'Unable to load dynamic
library c:\php\extensions\php_oci8.dll'
.. I'm quite sure that this file exist!!. More than this, I already use
php_socket.dll, and this library is loaded ok.
.. I've been already check PATH, and "c:\oracle\ora9x\bin" is there.
.. I tried to copy "php_oci8.dll" and "oci8.dll" to "system32" folder but
doesn't work.

What I'm missing????

2) In just one machine working with Oracle 9.2i client, I can load
php_oci8.dll (i get this installing an uninstalling php, iis, and oracle
client too many times, so I don't know why it's working...). But, (there is
always a but...), when I try to connect, I get the following error:
"Warning: ocilogon(): _oci_open_server: s":
.. Enviroment variables like "ORACLE_SID", "ORACLE_HOME" "TNS_ADMIN"
"LD_LIBRARY_PATH" are OK!
.. "tsnames.ora" is ok to (I know that because I can use SQLPlus, and tnsping
is fine)

Again: Wha't I'm missing???

I'm using PHP version 4.x (I already tried 4.0, 4.1, 4.2 and 4.3.4, and
always get the same problem), IIS 4.5, and Windows XP Pro.

Thanks a lot!!

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Thu, 20 Nov 2003 12:27:44 -0300, "Gustavo Oliveira"
<lg****************@matrix.inf.br> wrote:
I've been installed Oracle Client. 9.1i in some computers and 9.2i in
others. The installation was sucefull, because, I can use SQL Plus,
without problems...

Now I'm trying to connect, PHP with Oracle, and I'm experimented to
diferents problems:

1) When I start PHP, I get the error message: 'Unable to load dynamic
library c:\php\extensions\php_oci8.dll'
. I'm quite sure that this file exist!!. More than this, I already use
php_socket.dll, and this library is loaded ok.
That error can mean a bit more than it says; e.g. one of the libraries that
library depends on can't be loaded.
. I've been already check PATH, and "c:\oracle\ora9x\bin" is there.
OK... but is it there in the environment the web server sees? This can be
different to your user's environment.
. I tried to copy "php_oci8.dll" and "oci8.dll" to "system32" folder but
doesn't work.
Don't do that. Remove them from system32 else you'll get into a worse mess.

Besides, it's oci.dll on Windows, not oci8.dll.
What I'm missing????
The usual things are:

(a) Environment for the webserver different from that of your user, so it works
for you, but not for your webserver.

(b) Oracle 9i installs the Oracle home with tighter permissions than it did in
8i, so make sure your webserver user has at least read and execute permissions
on the Oracle home directories and files.

As a test, you could alter the service for your webserver to log on as your
user, rather than the system user it's probably set to. If this works, then
it's one of the issues above.
2) In just one machine working with Oracle 9.2i client, I can load
php_oci8.dll (i get this installing an uninstalling php, iis, and oracle
client too many times, so I don't know why it's working...). But, (there is
always a but...), when I try to connect, I get the following error:
"Warning: ocilogon(): _oci_open_server: s":

Is that what appears? Corrupted characters like that? Looks bad.

What sort of client install did you do? Did it install the OCI libraries? I
can't remember off the top of my head what gets installed in a client install
since I usually do a Custom install to pick and choose the bits I want.
. Enviroment variables like "ORACLE_SID", "ORACLE_HOME" "TNS_ADMIN"
"LD_LIBRARY_PATH" are OK!
LD_LIBRARY_PATH doesn't apply to Windows; it just uses PATH for both libraries
and executables.
. "tsnames.ora" is ok to (I know that because I can use SQLPlus, and tnsping
is fine)


--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.