Help Please!! Oracle/PHP connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-------------------------------------------------
<?php
$user ="netuser";
$upasswd ="netuser";
$dsn ="CSSD";
$conn = odbc_connect($dsn,$user,$upasswd);
        echo  "conn:  $conn";
        if  ($conn  <=  0)  {
                echo  "Error  in  connection<BR>";
                exit;
                  }
        else  {
                echo  "<P>Connection  successful\n";
                  }
odbc_Close($conn);
?>
----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.
 
Appriciated,
 
Yousef
 
 


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

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux