Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 53895 invoked from network); 25 Jun 2008 08:43:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jun 2008 08:43:39 -0000 Received: (qmail 52077 invoked by uid 500); 25 Jun 2008 08:43:39 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 52045 invoked by uid 500); 25 Jun 2008 08:43:39 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 52034 invoked by uid 99); 25 Jun 2008 08:43:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jun 2008 01:43:39 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of david.rekowski@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 25 Jun 2008 08:42:47 +0000 Received: (qmail invoked by alias); 25 Jun 2008 08:43:05 -0000 Received: from pD9E86234.dip.t-dialin.net (EHLO [192.168.2.24]) [217.232.98.52] by mail.gmx.net (mp028) with SMTP; 25 Jun 2008 10:43:05 +0200 X-Authenticated: #5862305 X-Provags-ID: V01U2FsdGVkX19FzfsZjB5Fzb+yMqaMmY93vs9DGq+m5X/ditXzEf PTYowEHGk4BRD/ Message-ID: <48620516.4040805@gmx.de> Date: Wed, 25 Jun 2008 10:43:02 +0200 From: David Rekowski User-Agent: Thunderbird 2.0.0.14 (X11/20080421) MIME-Version: 1.0 To: derby-user@db.apache.org Subject: Problem connection to derby with PHP using PDO or ibm_db2 (Linux) X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org 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 http://coffeecode.net/archives/16-Apache-Derby-tutorial-OSCON-2005-materials.html PDO works for example with mysql, but when I try to connect to derby via PDO like this $DSN = "DRIVER={IBM DB2 ODBC DRIVER};PROTOCOL=TCPIP;DATABASE=MYDB;HOSTNAME=localhost;PORT=1527"; $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: DRDA_SecurityInstalled.I Apache Derby Network Server 10.3.1.4 - (561794) wurde gestartet und ist seit 2008-06-25 08:24:44.666 GMT bereit, Verbindungen am Port 1527 zu akzeptieren. (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. --- System: Ubuntu 8.04 (x86) Derby 10.3.1.4 Apache 2 PHP 5.2.4 ibm_db2 1.6.6 r1.75 pdo_odbc is unixODBC -- David Rekowski mailto:david.rekowski@gmx.de