Please Help! - PHP 5 + APACHE 2.2 + ORACLE 10.2 on windows box



Hi,

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

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?)

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

many thanks,
Dan.

.



Relevant Pages

  • Re: PHP/Oracle home problem ?
    ... an Oracle setup and configuration problem with PHP. ... Oracle group but I have had no luck in the PHP groups and Mladen ... But the Oracle DB and php works well with the Ubuntu. ...
    (comp.databases.oracle.server)
  • Re: php or coldfusion?
    ... If you can't get PHP to work and you can get coldfusion to ... Interestingly enough Oracle has committed to and there are websites devoted ... to Oracle DB, web server, and PHP with appropriate extensions. ... something which utilizes PHP and Oracle PL/SQL to manipulate and query data ...
    (alt.php)
  • Re: PHP/Oracle home problem ?
    ... I have what I thought was a PHP problem but I think it is ... an Oracle setup and configuration problem with PHP. ... Oracle group but I have had no luck in the PHP groups and Mladen ...
    (comp.databases.oracle.server)
  • Re: [PHP] Re: DB Comparisons
    ... technologies like MS sequel server oracle - coldfusion etc.... ... I imagine that most middleware like php / asp / coldfusion is relatively ... language and go for a pre compiled programming language. ... MSSQL is slow, and you need the latest versions to get the features you ...
    (php.general)
  • Re: Fetch table names from query
    ... I've implemented a very simple results cache in my PHP application but I'd like to improve it. ... Writing a reliable SQL parser in PHP looks like a hard task and obtaining a full explain plan from the Oracle server looks like an overkill. ... Leave managing the database to the database professionals. ...
    (comp.databases.oracle.misc)