Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PHP-ODBC connection erroe

670186Nov 12 2008 — edited Nov 14 2008
Hi all

I hope i'll get some help from you guys to fix this issue. I'm trying to get connected with Oracle ODBC and PHP 5.2.6 on windows 2003 R2 server, Enterprise x64 Edition Service pack 2. Oracle is installed on different machine. so I followed following steps

1. Installed Oracle 10.2.0 client.

2. Open sqlplus to test the connection and it worked fine. no issues

3. I created a System DSN in ODBC using Oracle in Oraclient10g_home1 driver, tested the connection and it worked fine

4. Download the latest PHP 5.2.6 zip package php.net site

5. extract it to 'd' drive.

5) Create a test.php file to connect dsn in the D:\php-5.2.6-Win32 directory, and following is the content for same:
<?php
odbc_connect("ebook","ebook123","ebookdev");
?>

6) When I try to execute from command prompt then we get following issue

D:\php>php.exe test.php
Warning: odbc_connect(): SQL error: MicrosoftODBC Driver Manager Data source name not found and no default driver specified, SQL state IM002 in SQLConnect in D:\php-5.2.6-Win32\test.php on line 3
D:\php-5.2.6-Win32>

any help will be appreciated

Thanks,
Nischal
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 12 2008
Added on Nov 12 2008
1 comment
3,318 views