Easysoft ODBC-ODBC Bridge

Why cannot Apache/PHP find my odbc.ini file? Why do I get error "Datasource not found and no default driver"?

Article:
00979
Last Reviewed:
25th January 2024
Revision:
1

When you start Apache with PHP built with ODBC support, PHP immediately allocates an ODBC environment handle. Unfortunately, the Easysoft ODBC-ODBC Bridge searches for the odbc.ini file when an environment handle is created and so your odbc.ini file needs to found at Apache startup. This can be a nuisance since most people start Apache at machine boot time from an rc script but locate their odbc.ini files in the same directory as their PHP scripts. The best way around this is to put all your DSN definitions in the /etc/odbc.ini file (or SYS$ROOT:odbc.ini for VMS).

Applies To

Knowledge Base Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)