[unixODBC-support] PHP and unixODBC installation help. Can't create User DSN.

Ryan Churches ryan.churches at gmail.com
Sat Apr 28 05:49:38 BST 2007

I am very new to all of this so please bear with me.

I would like to be able to query a remote Centrua/Gupta SQLBase DB
from my house.  I have the correct credentials for the DB, and the
windows ODBC manager says the DSN is accepting connections.

At my house I have installed PHP, built --with-unixODBC=/usr (as
gentoo does when I enable the ODBC use flag).  I have also installed a
package called pecl-php-odbc.   In my php.ini file I have added the
directive "extension pdo.so".

My first question is if I still have configuration to do with respect
to PHP, or am I done there?

Secondly, regarding unixODBC, I have installed a driver for my DB, and
I am now trying to configure unix odbc.  The driver package provides
me with obdcinst.ini and obdc.ini files, which I am using.


Description=Gupta SQLBase DSN
IsoLevel=Release Locks

[Gupta SQLBase]
Driver = /opt/Gupta/SQLBase901/libsqlbaseodbc.so
Setup  = /opt/Gupta/SQLBase901/libsqlbaseodbcsetup.so

After doing this I see that in the ODBCConfig an entry has appeared
under the Driver and System DSN tabs.  The documentation I have been
using advises me to try and create an entry under the User DSN tab,
but I cannot (I click add and select the DB, hit OK, but I am returned
to the main screen, and no entry is added).

Finally, I try to see if it works by connecting to a db after all my
efforts, and the error message displayed to me is the exact same one
as before I had done anything to configure unixODBC:

"Warning: odbc_connect() [function.odbc-connect]: SQL error:
[unixODBC][Driver Manager]Data source name not found, and no default
driver specified, SQL state IM002 in SQLConnect in
/var/www/localhost/htdocs/meiga_db.php on line 3"

Now, I'm not surprised it didnt find the data source.  In all the
documentation I haven't seen any example of how to connect to a DB not
in your LAN, so I'm sure I did that wrong.  Either I haven't found
those docs yet, or i'm starting to think its not possible.

What does surprise (and frustrate) me is that it says no default
driver has been selected.  I thought I just did that with the last
step.  Basically, I've spent hours looking into this with no progress,
and I'm hoping someone can point me in the right direction.

More information about the unixODBC-support mailing list