php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37599 PHP Hang loading a CLOB
Submitted: 2006-05-26 09:53 UTC Modified: 2006-05-30 09:51 UTC
From: antonio dot pascual at es dot francetelecom dot com Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 5.1.4 OS: SuSE Linux 9.1 (i586)
Private report: No CVE-ID: None
 [2006-05-26 09:53 UTC] antonio dot pascual at es dot francetelecom dot com
Description:
------------
PHP hang loading a clob from Oracle. With earlier versions it didn't occur. The same happends with version php5.2-200605251030.

Reproduce code:
---------------
The table created with the data and the php script to reproduce the bug is available here:

http://antback.com/doc/php/ocilobbug.txt

Expected result:
----------------
The expected result was:
aaaaaa
bbbbbbbbb
aa
bb

Actual result:
--------------
The result:
aaaaaa
bbbbbbbbb

and php hangs.

You can see the output of oci_internal_debug here:

http://antback.com/doc/php/ocilobresult.txt

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-26 10:41 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2006-05-26 11:24 UTC] antonio dot pascual at es dot francetelecom dot com
The same error:

  http://antback.com/doc/php/ocilobresult2.txt
 [2006-05-29 09:18 UTC] tony2001@php.net
Works just fine here.
This is what I get:
aaaaaa
bbbbbbbbb
aa
bb
marP=a
 [2006-05-29 11:04 UTC] antonio dot pascual at es dot francetelecom dot com
Could you please tell me the Oracle client and server version you have?

Thanks
 [2006-05-29 11:07 UTC] tony2001@php.net
OIC 10.1.0.3 and Oracle 9.2.0.1.0.
How about your versions ? 
 [2006-05-30 09:11 UTC] antonio dot pascual at es dot francetelecom dot com
OIC 10.1.0.3 and Oracle 10g Release 10.2.0.1.0.

I'm playing with the code, because with php version 1.5.2
works fine but with 1.5.3 and further don't works. I have
patched the file ext/oci8/oci8_lob.c with this:

153a154
>       ub4 block_length = PHP_OCI_LOB_BUFFER_SIZE;
186a188,191
>       if (requested_len < block_length) {
>               requested_len = block_length;
>       }
>       
243a249,251
> 
>               requested_len = PHP_OCI_LOB_BUFFER_SIZE;
> 

and works but in any case I am going to test the example
in another machine and with other version of Oracle Server. 
Maybe my system has something wrong ...

Thanks.
 [2006-05-30 09:16 UTC] tony2001@php.net
1.5.2? 1.5.3?
Please use `diff -u` to generate human-readable diffs.
 [2006-05-30 09:47 UTC] antonio dot pascual at es dot francetelecom dot com
I have patched the file from version 1.5.4. Here is the patch

http://antback.com/doc/php/oci8_lob.c.patch

I made the changes to the file considering the differences
made since version 1.5.2, the latest release that my example works with.
 [2006-05-30 09:51 UTC] tony2001@php.net
Your patch doesn't make any sense, sorry.
You're just reading PHP_OCI_LOB_BUFFER_SIZE each time, that's all.
Please follow this report http://pecl.php.net/bugs/bug.php?id=7721, I'm working on it with the reporter currently.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 01 14:01:29 2024 UTC