php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #903 odbc_result() yields "Memory allocation failure, SQL state S1001 in SQLGetData"
Submitted: 1998-11-06 11:11 UTC Modified: 1999-02-16 04:44 UTC
From: peter dot lerner at bayreuth dot baynet dot de Assigned: kara (profile)
Status: Closed Package: ODBC related
PHP Version: 3.0 Latest CVS (06/11/1998) OS: Linux 2.0.35
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: peter dot lerner at bayreuth dot baynet dot de
New email:
PHP Version: OS:

 

 [1998-11-06 11:11 UTC] peter dot lerner at bayreuth dot baynet dot de
hi,

i use adabas ...
 Kernel Version  'KERNEL 10.05.04     DATE 1998-07-28'
 RTE    Version  'RTE 10.05.01  LINUX DATE 1998-04-27'
 Control Version 'CONTROL 10.05.02    DATE 1998-07-03'
... and php3/3.06-dev as apache-modul, apache 1.3.3,
linux 2.0.35, etc ...


i get the following strange error while trying to display
a gif-picture out of a LONG row from adabas.

------
Warning: SQL error: [SOFTWARE AG][ODBCLIB A]Memory allocation failure.,
SQL state S1001 in SQLGetData in
/usr/local/apache/htdocs/ivdm/blau/haendler/display.php3 on line 14
------

i use the php-program named 'display.php3', shown in the following.
'display.php3' is simply derived from the odbc-testsuite delivered
with php3 in the 'tests' directory.

btw ... the testsuite shows the same problem as my code.
and i am not quite sure, if the problem is php3/odbc or
adabas/odbc related.

with Adabas-WebDB or tkquery i get some contents out of my
LONG row, but not with php3 .... i did not yet try it with e-sqlc ...

perhaps the problem is php-related, or could be solved on the
php-side ... i can provide you with the latest adabas odbc-ref-manual
if you need any info, but be prepared its big ... perhaps adabas
again has some %?/$%-standard extensions, that you did not yet
take care off ...

------- detail.php3 -------
<?php

//echo "uid = " . $uid . "<br>\n";

if($conn = odbc_connect("xxx", "ABC", "GUESS"))
{
  if($result = odbc_exec($conn, "SELECT logo FROM haendler WHERE uid = '$uid'"))
  {
    odbc_binmode($result, 0);
    odbc_longreadlen($result, 0);
    if(odbc_fetch_row($result, 1))
    {
      header("content-type: image/gif");
>      odbc_result($result, 1);    // here is the problem !!
      exit;
    }
  }
}
echo "ups. ;=)";

?>
------------- schnapp ------------

mfg
peter lerner

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-02-16 04:44 UTC] kara
Does this problem still exist with 3.0.6 / latest CVS? 
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Jan 20 09:01:23 2020 UTC