db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Rekowski <david.rekow...@gmx.de>
Subject Problem connection to derby with PHP using PDO or ibm_db2 (Linux)
Date Wed, 25 Jun 2008 08:43:02 GMT
Hello list!

My aim is to get PHP to connect and work with Apache Derby. (See end of
message for system and versions)

I tried to follow Dan Scotts slightly outdated tutorial from

PDO works for example with mysql, but when I try to connect to derby via
PDO like this
$dbh = new PDO("odbc:$DSN");

I get the following error:

SQLSTATE[IM002] SQLDriverConnect: 0 [unixODBC][Driver Manager]Data
source name not found, and no default driver specified

Derby is started and states:

Apache Derby Network Server - (561794) wurde gestartet und ist
seit 2008-06-25 08:24:44.666 GMT bereit, Verbindungen am Port 1527 zu

(sorry for the localized output)

I also tried to connect via db2_connect, which results in this error:
[IBM][CLI Driver] SQL10007N Message "0" could not be retrieved.  Reason
code: "3". SQLCODE=-1390"

However, I can connect to the database using ij:
connect 'jdbc:derby://localhost:1527/MYDB';

I couldn't find anything closely related in the mailing list archive and
google wasn't a great help either; most hits were related specifically
to DB2.

Any hints and help are greatly appreciated.

Ubuntu 8.04 (x86)
Apache 2
PHP 5.2.4
ibm_db2 1.6.6 r1.75
pdo_odbc is unixODBC

David Rekowski

View raw message