Re: Please Help! - PHP 5 + APACHE 2.2 + ORACLE 10.2 on windows box
- From: "dan_e" <the.route@xxxxxxxxx>
- Date: 29 Oct 2006 12:43:27 -0800
Andy Hassall wrote:
On 26 Oct 2006 00:11:12 -0700, "dan_e" <the.route@xxxxxxxxx> wrote:
I have got PHP 5 working on this windows box with APACHE 2.2. I cannot
however get PHP to connect to an oracle database.
Here is all the info that may help determine what i'm doing wrong.
PHP.ini file has been change to show the following:
(under Windows extensions)
extension=php_oci8.dll
extension=php_oracle.dll
Remove the second one, it's obsolete (based on Oracle 7).
I have unzipped the oracle 10.2 client and placed my tnsnames.ora file
in there with the following:
DJD1 =
(DESCRIPTION =
(SDU=4096)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = dusrvdb)(PORT = 1522))
)
(CONNECT_DATA =
(SERVICE_NAME = djd1.corp.cranegroup)
)
)
I have set the system environment variables on the windows box with the
following
Path = C:\PHP\instantclient_10_2;c:\...etc (more paths)
tns_admin = C:\PHP\instantclient_10_2
The \instantclient_10_2 directory only holds the dll's, etc and my
tnsnames.ora file.
There is a version of Oracle 9.2 installed at this location:
c:\Oracle\Ora92\Bin....(and all the other dirs)
but i make no reference to it (should i?)
No, stick with Instant Client as you are. In fact, the more recent binaries of
PHP's OCI8 extension won't work against 9i, as they use 10g features.
Below is the php code i am using to try and determine if i get a
connection or not:
<?php
$database = OCILogon("the_username", "the_password", "DJD1");
if(!$database)
die("<H1>Unable to connect!</H1>");
OCILogOff($database);
echo("<H1>SUCCESS!</H1>");
?>
If someone could please offer any advice that would great! I have done
a little with PHP before, but never touched Oracle. I am clueless...
You've not posted what actually happened. Also use OCIError to get more
information, assuming you even got that far.
--
Andy Hassall :: andy@xxxxxxxxxxx :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Thanks for the info. The error i am getting is "array". Do you know
what this means?
Thanks,
Dan.
.
- References:
- Please Help! - PHP 5 + APACHE 2.2 + ORACLE 10.2 on windows box
- From: dan_e
- Re: Please Help! - PHP 5 + APACHE 2.2 + ORACLE 10.2 on windows box
- From: Andy Hassall
- Please Help! - PHP 5 + APACHE 2.2 + ORACLE 10.2 on windows box
- Prev by Date: Re: php5apache2.dll
- Next by Date: Re: Please Help! - PHP 5 + APACHE 2.2 + ORACLE 10.2 on windows box
- Previous by thread: Re: Please Help! - PHP 5 + APACHE 2.2 + ORACLE 10.2 on windows box
- Next by thread: Re: Please Help! - PHP 5 + APACHE 2.2 + ORACLE 10.2 on windows box
- Index(es):
Relevant Pages
|