|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19349 odbc_longreadlen() does not work
Submitted: 2002-09-10 20:33 UTC Modified: 2004-04-21 00:13 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: truth at ichaos dot com Assigned:
Status: No Feedback Package: ODBC related
PHP Version: 4CVS, 5CVS OS: SuSE 8.0
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.
Bug Type:
From: truth at ichaos dot com
New email:
PHP Version: OS:


 [2002-09-10 20:33 UTC] truth at ichaos dot com
I am using PHP with ODBC (IBM DB2) support and since upgrading to 4.2.1 from 4.0.4pl1, my odbc_longreadlen() function no longer works. I have to set it in the configuration file now, as that is the only place that it works properly.

In addition, when it's set above 2000000 in the config file, httpd starts taking 75% of the CPU (system, not user) and the data never gets to PHP. Am I hitting some type of limitation? How else do I get my 10MB CLOB out of DB2?


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-11 10:27 UTC] truth at ichaos dot com
I have a script that runs a select statement from a 10MB CLOB field (among others). I run the following :

odbc_longreadlen($resultid, 3000000);

Then I run:

$document = odbc_result($resultid, 2);

The problem is, $document ends up with 4096 bytes of data (the default, NOT 3000000). If I edit php.ini and set up odbc_lrl to 2000000 in there, then $document ends up with 2MBin it. It acts like the function odbc_longreadlen does not work at all.

I don't know how much more information I can give other than odbc_longreadlen does not seem to do anything at all.
 [2002-11-02 14:51 UTC]
can you please provide the full script sample for this?  I think I do see what is wrong, but want to make sure.
 [2002-11-16 12:06 UTC] truth at ichaos dot com
Script is pretty simple. It's hard to just cut and paste because I have everything spread out in a bunch of classes.

$linkid = odbc_pconnect("database", "username", "password");
$result = odbc_exec($linkid, "SELECT SUBSTR(document, 1, 2000000) FROM documents WHERE doc_id = 1);
odbc_longreadlen($result, 2000000);
odbc_binmode($result, ODBC_BINMODE_PASSTHRU);
$column = odbc_result($result, 1);

// A short example of what I'm trying to do.
// $column should be filled with up to 2000000 bytes of data.
// By default, it's up to 4096 bytes of data, or whatever is
// set in the php.ini file.
 [2004-04-21 00:13 UTC]
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.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 21 01:01:27 2024 UTC