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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC