472,958 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

PHP 5.03 IIS 6 Oracle 9i connection help needed

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
worked.

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?

Thanks,
Jay

Jul 17 '05 #1
2 3668

ja**************************@THANKSgmail.com wrote:
Can someone outline the
steps I need to take, or provide a link to a tutorial for a setup
similar to this one?


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.

http://www.oracle.com/technology/pub...p_instant.html

A patch to fix the distro for PHP 5 is given in the manual comments:
http://us2.php.net/oci8

The patch is here, I've built with this:
http://www.pubanz.de/jakob/php5_ociclient.zip

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

http://www.oracle.com/technology/
docs/tech/sql_plus/10102/readme_ic.htm

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:

http://download.oracle.com/otn/solaris/instantclient/
instantclient-sqlplus-solaris32-10.1.0.3.zip

....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.

Jul 17 '05 #2
On 23 Feb 2005 09:22:59 -0800, "ja**************************@THANKSgmail.com"
<Ja**************@gmail.com> wrote:
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
worked.

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?
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:
Some of the same steps were followed, but I am not able to connect.


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

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Harry | last post by:
Using Oracle 8i enterprise on win 2000 (sp3) Installed the standard configuration & whenever I make a connection it takes about 10 secs. It's running on a P1900 with 1gb Ram so no reason there...
1
by: Eirik Tryggeseth | last post by:
During deployment of an application using distributed transactions managed under COM+ on an Oracle 9i RAC database, we encounter situations where the load balancing mechanisms in the RAC result in...
1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
7
by: D. Patrick | last post by:
I need to connect to an Oracle database. I've never done it before. I see that with framework 1.1 you had to download ODP.NET from Oracle's site in order for the framework classes to even work....
3
by: RLN | last post by:
Re: Access 2003/Oracle 9i I have an Access app that connects to an Oracle DB via OLEDB/VBA code (no DSN or ODBC) Queries against straight Oracle tables run fine. For this query, however,...
5
by: jonceramic | last post by:
Hi All, I started developing in Access, and people took notice and so we're starting to migrate into our corporate's bigger Oracle system. I'll still be using my developed Access front ends,...
6
by: S_K | last post by:
Hi all! I'm writing an ASP.NET web application that uses an Oracle database. I OPEN the Oracle connection by using the following code: if (this.ConnectionString != "") { this.Connection =...
2
by: devas | last post by:
Hai, Issue: I am using OEM 10g grid control. I want to establish the connection from oracle to sql server=>I can’t able to connect it. Please help me I have created the system dsn below steps....
23
by: Gloops | last post by:
Hello everybody, Is anyone able to give me some indications about how to develop an Access interface for an Oracle database ? I dispose of Access 2003 (11.6566.8107) SP2, Oracle 9i 9.2.0.1.0...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.