Have you tried the built in Oracle functions in PHP?


oracle_logon() may be useful here ...

Let me know if it works out for you.


-----Original Message-----
From: Y Al Hinai [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 10, 2003 8:03 PM
Subject: [PHP-DB] Help Please!! Oracle/PHP connection

Hey guys,
I would really appriciate it if someone can direct me with this problem.
On my laptop I have:  Windows XP Professional, Oracle 9i Database, Oracle
Client Software, PHP4.3.1, and Apache server.
PHP and Apache work fine.  Oracle i9 by itslef works fine too.  However when
i tried to connect from PHP to Oracle using the following code:
---Code Start-------------------------------------------------
$user ="netuser";
$upasswd ="netuser";
$dsn ="CSSD";
$conn = odbc_connect($dsn,$user,$upasswd);
        echo  "conn:  $conn";
        if  ($conn  <=  0)  {
                echo  "Error  in  connection<BR>";
        else  {
                echo  "<P>Connection  successful\n";
----Code End------------------------------------------------------
I get the following error:
xxxxxxxxxxError Start xxxxxxxxxxxxxxxxxxxx
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified, SQL state IM002 in SQLConnect in
C:\Documents and Settings\Administrator\My Documents\php\project\php14.tmp
on line 5
conn: Error in connection
xxxxxxxxxxError End xxxxxxxxxxxxxxxxxxxx
I have already set up the ODBC by going to Administrative Tools -> Data
Sources (ODBC) -> User DSN -> and added an "Oracle in OraHome92" driver for
my database.
Please help me out guys.  This is for my Master's Thesis project.

Do you Yahoo!?
Free online calendar with sync to Outlook(TM).

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to