From:             thomas dot pataki at vonessenbank dot de
Operating system: Linux Suse 9.0 w. 2.4.25
PHP version:      4.3.5
PHP Bug Type:     ODBC related
Bug description:  unixODBC functions broken if php>4.3.4

Description:
------------
Hello,



we used 4.3.4 with unixODBC Support compiled in(we use unixODBC 2.2.8),
php was compiled as a module 

./configure \

--with-apxs=/usr/local/apache/bin/apxs \

--with-unixODBC=/usr/local/unixODBC \

--with-mysql=/usr/local/mysql/4.0.16 \

--with-zlib \

--with-ftp \

--with-gd \

--with-jpeg-dir=/usr/lib \

--enable-versioning \

--enable-track-vars=yes \

--enable-url-includes \

--enable-sysvshm=yes \

--enable-sysvsem=yes \

--with-config-file-path=/etc



Until 4.3.4 everything ist working fine, but after upgrade to 4.3.5 or
even the newest 4.3.6 the connection to the DB (IBM DB2) fails with this
error:



[nativecode=S1000 [unixODBC][IBM][iSeries Access ODBC Driver]Missing
system name needed for connection.] ** odbc://xxxx:[EMAIL PROTECTED]/ctbessen

DB Error: connect failed



the php code of this is the following:



<?php

putenv("ODBCINI=/etc/odbc.ini"); // muss sein

require_once 'DB.php';

$user = 'xxxxx';

$pass = 'xxxxx';

$host = 'as400'; // DSN, nicht Hostname (der steht in odbc.ini)!

$db_name = 'ctbessen';

$dsn = "odbc://$user:[EMAIL PROTECTED]/$db_name";

$db = DB::connect($dsn, true);

if (DB::isError($db)) {

     echo $db->getDebugInfo()."<br>";

      die ($db->getMessage());

          }

          $sql = "SELECT * FROM xxxx.xxxx.xxxx WHERE xxxx = xxxx"; //
AS400.database.table

          $rs = $db->query($sql);

          while ($row = $rs->fetchRow())

          {

                   print $row[1]." ";

                   print $row[2]." ";

                   print $row[11]."<br>";

                   }

                   $db->disconnect();

   ?>



if I downgrade to 4.3.4 everything is ok....

p.s. no changes to the php.ini (original from php.ini-dist)

greetings Thomas


-- 
Edit bug report at http://bugs.php.net/?id=28022&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28022&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28022&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28022&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28022&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28022&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28022&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28022&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28022&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28022&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28022&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28022&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28022&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28022&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28022&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28022&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28022&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28022&r=float

Reply via email to