PHP 5.03 IIS 6 Oracle 9i connection help needed

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi, I set up PHP 4.xx using Apache 1.3 on Windows XP to begin a
project.  The project now needs to be moved to a real test box.
Admittedly, I am not quite sure how I was able to access Oracle on my
machine, but I know I have the Oracle client installed, have two odbc
DSNs (CAI/PT Oracle 8) installed and uncommented php_oci8.dll and
php_oracle.dll.  Other than that, I kind of just played around until it

Now my code needs to be moved to a W2k3 IIS 6 machine.  PHP 5.0.3 was
installed.  The database is on a different server and is Oracle 9i.
Some of the same steps were followed, but I am not able to connect.  I
want to have the proper connection procedures.  Can someone outline the
steps I need to take, or provide a link to a tutorial for a setup
similar to this one?


Re: PHP 5.03 IIS 6 Oracle 9i connection help needed wrote:
Quoted text here. Click to load it

I ran it with instantclient and xampp (PHP 5.0.3) on Windows without
having to build anything.

If you don't have an oracle install yet,  try putting Oracle Instant
Client,  instantclient, on the PHP box and test connect using sqlplus,
make sure that works.  Then some of the tips below may help.

I got OCI8 working on Windows,  albeit with the prebuilt xampp stack.

A patch to fix the distro for PHP 5 is given in the manual comments:

The patch is here, I've built with this:

This part of the message is to post tips for Oracle OCI on Solaris:

Just made this on solaris8 32bit, actually works.

1) put everything in one directory
2) unsetenv ORACLE_HOME
3) set the env vars LD_LIBRARY_PATH and SQLPATH and TNS_ADMIN(if you
have it) to that directory.
4) use one of the other easy connection notations here /

These env vars worked when put at the top of apachectl script as well.

To build you may have to fake it out with an ORACLE_HOME var,  but
unset it later.  You may also have to fake out the build by putting
header files where it is looking for them,  e.g. in the rdbms/demo
directory or some such other place.

When running though,  make sure you have only the files required in
only one directory.

Oracle has not put up a link to the 32bit solaris sqlplus--you have to
guess it--it's there though: /

....and don't forget to add ".world" on to the end of your SID. It's
very common to have to specify DBNAME.WORLD to connect.

Re: PHP 5.03 IIS 6 Oracle 9i connection help needed

On 23 Feb 2005 09:22:59 -0800, ""

Quoted text here. Click to load it

 Here's the main steps:

(1) Install Oracle Client (including OCI), either 9i (9.2) or 10g (10.1).

(2) Patch Oracle up to latest patchset.

(3) Ensure $ORACLE_HOME/bin is added to the PATH environment variable -
systemwide so that the webserver gets it in its environment. You'll need to
restart at least the webserver, if not the machine, to get the environment
changes picked up.

(4) Modify permissions on the Oracle home to allow the IIS6 user
(IUSER_<machinename>, I think) to read and execute, else it won't be able to
load the library - 9i and 10g by default set permissions so it won't.

(5) Make sure the database you want to connect to is properly set up in
tnsnames.ora. Optionally use the TNS_ADMIN environment variable to point to a
tnsnames.ora outside the Oracle home if you've got one somewhere else,
otherwise just modify the one in $ORACLE_HOME/network/admin.

(6) Activate php_oci8.dll in php.ini.

 And you're done.

 There are a load of things that can go wrong, of course. You've said:

Quoted text here. Click to load it

 ... but not said what problems you have. If you post that then you could get
more relevant advice.

< Space: disk usage analysis tool

Site Timeline