473,769 Members | 1,632 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3712

ja************* *************@T HANKSgmail.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_<machine name>, 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.andyhsoftwa re.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
14523
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 for slowness. Once I'm connected the queries work pretty much instantanously but to connect using SQLPLUS, Toad, ODBC, OLEDB all take about 10 secs. I connect using OLEDB from Visual Basic development environment & after the 1st connection...
1
8219
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 that the component context in the distributed transaction (in our case two different COM components) cannot hold onto the same ODBC connection. Or it may be that the database session is changed dynamically for the ODBC connection, so that...
1
9199
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 will work for 9i and even 10g ) No one had what I needed, so I wrote it myself. I Rule. This code isn't going for efficiency, and isn't trying to be dynamic. It doesn't create the table structure in Oracle, that's up to you. (I
7
4362
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. I tried that quickly, but the file is 400 MB, and the the installation asks for all kinds of things in order to install. Now I'm very confused. a) Do you still need ODP.NET with framework 2.0? b) Do you need to download and install other...
3
4356
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, the condition for finding DeptID's in the Oracle table have to be filtered by a list of DeptID's found in "tblDeptID" which is a simple local Access table containing one column
5
7235
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, but will be migrating my back ends to Oracle ODBC. 1. Does anyone have recommendations for books or web resources for general rules/guidelines/help on doing this? I haven't found a good
6
16788
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 = new OracleConnection(this.ConnectionString); this.Connection.Open();
2
5541
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. Step 1) Open the odbc data source administrator Step 2) select the system dsn tab page. And gave the dsnname Step 3) configure the server and tested the connection Step 4) connection has COMPLETED SUCCESSFULLY!
23
3428
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 and ODBC 3.525.1117.0, on Windows XP Pro 5.1.2600 SP2 Nu 2600. I failed executing an Oracle stored procedure from Access, and a trigger to store data to a temporary table was active from SQL*Plus, but
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9994
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8870
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.