php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28022 unixODBC functions broken if php>4.3.4
Submitted: 2004-04-16 05:55 UTC Modified: 2005-01-26 01:00 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:2 (66.7%)
From: thomas dot pataki at vonessenbank dot de Assigned:
Status: No Feedback Package: ODBC related
PHP Version: 4.3.5 OS: Linux Suse 9.0 w. 2.4.25
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: thomas dot pataki at vonessenbank dot de
New email:
PHP Version: OS:

 

 [2004-04-16 05:55 UTC] thomas dot pataki at vonessenbank dot de
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:xxxx@as400/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:$pass@$host/$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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-16 11:52 UTC] kalowsky@php.net
Considering the amount of changes between 4.3.4 and 
4.3.6 amounts to a single line in the config.m4 for 
DBMaker systems, my initial guess is that this not a PHP 
problem.  

It seems you might have a misconfiguration on the other 
end of things.  No odbcinst used.  The error itself is 
telling you the system name is needed.  Please verify 
that it exists.
 [2004-04-23 17:42 UTC] iliaa@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 [2004-05-19 11:12 UTC] thomas dot pataki at vonessenbank dot de
one simple question:

the whole environment is the same, and only the php version is changing. So tell me why do I have to search the error at other things then php? To resolve the problem I changed to another driver model (IBM DB2 Personal Connect/ODBC).
 [2005-01-26 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun May 09 21:01:24 2021 UTC