php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7781 Unable to connect to ODBC Datasource
Submitted: 2000-11-13 09:05 UTC Modified: 2000-11-15 10:20 UTC
From: ties at dse dot nl Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.1pl2 OS: RedHat 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ties at dse dot nl
New email:
PHP Version: OS:

 

 [2000-11-13 09:05 UTC] ties at dse dot nl
This error i get when connecting to a unixODBC datasource:

Warning: SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in
                                                 /var/www/html/test.php4 on line 8

unixODBC 1.8.12 is correctly setup, I can access my Postgres database via the supplied 'DataManager' application. But somehow there seems to be no connection possible between PHP and the ODBC Driver manager. These are the compile options I used for PHP:

./configure --with-apxs=/usr/sbin/apxs --target=i386-redhat-linux --prefix=/usr --with-config-file-path=/etc --disable-debug --enable-pic --enable-inline-optimization --disable-static --with-exec-dir=/usr/bin --with-regex=system --with-gettext --with-gd --enable-debugger --with-jpeg-dir=/usr --with-png --with-zlib --with-gdbm  --enable-safe-mode --enable-sysvsem --enable-sysvshm --enable-track-vars --without-mysql --with-unixODBC=/usr/local


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-13 10:19 UTC] kara@php.net
Does the user your webserver runs as (usually nobody) has read access to the odbc.ini file?

Maybe you have to set the environment variable ODBCINI  pointing to the odbc.ini file location.
 [2000-11-15 10:20 UTC] ties at dse dot nl
There was a problem with the ODBC.ini file. ODBCConfig did not save it as /etc/odbc.ini. Problem solved. Thanks for your suggestions !
 [2000-11-15 10:20 UTC] ties at dse dot nl
There was a problem with the ODBC.ini file. ODBCConfig did not save it as /etc/odbc.ini. Problem solved. Thanks for your suggestions !
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 22:01:29 2024 UTC