Help Please!! Oracle/PHP connection
| From: | Y Al Hinai | Date: | Wed, 11 Jun 2003 00:02:53 +0000 |
| Subject: | Help Please!! Oracle/PHP connection | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-28512@lists.php.net to get a copy of this message | ||
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).