From: a_kassasys at yahoo dot com
Operating system: Free BSF
PHP version: 5.2.1
PHP Bug Type: InterBase related
Bug description: invalid request BLR at offset 169 Implementation
Description:
------------
Similar on overflow of the buffer as at 1 inquiry, the server will crash,
in other case gives out that a block size limit
Reproduce code:
---------------
Warning: ibase_fetch_row() [function.ibase-fetch-row]: Error reading data
from the connection. in /home/denis/user/0.php on line 51
Warning: Unknown: Unable to complete network request to host
"192.168.0.20". Error writing data to the connection. Broken pipe in
Unknown on line 0
Warning: Unknown: Unable to complete network request to host
"192.168.0.20". Error writing data to the connection. Broken pipe in
Unknown on line 0
Expected result:
----------------
Warning: ibase_query() [function.ibase-query]:
invalid request BLR at offset 169 Implementation limit exceeded block size
exceeds implementation restriction
Actual result:
--------------
$sql="select PR.ID as F0
, PB.ID as F1
, cast(trimx(skui(strlen((select TEXT from GET_LANGUAGE_TEXT('ET',
'PRODUCT', 'NAME', PR.ID))), (select TEXT from GET_LANGUAGE_TEXT('ET',
'PRODUCT', 'NAME', PR.ID)), PR.NAME))||' '||trimx(PB.NAME) as
VARCHAR(32000)) as F2
, PR.SEARCHCODE as F8
, cast(trimx(skui(strlen((select TEXTB from GET_LANGUAGE_TEXT2('ET',
'PRODUCT', 'ADDITIONAL', PR.ID))), (select TEXTB from
GET_LANGUAGE_TEXT2('ET', 'PRODUCT', 'ADDITIONAL', PR.ID)), PR.ADDITIONAL))
as VARCHAR(32000)) as F3
, PR.PACKAGE as F7
, PR.PICTUREDATAEXT as F6
, skui(strlen((select TEXT from GET_LANGUAGE_TEXT('ET',
'PRODUCT_MEASUREMENT_UNIT', 'NAME', PR.MEASURUNIT_ID))),
(select TEXT from GET_LANGUAGE_TEXT('ET',
'PRODUCT_MEASUREMENT_UNIT', 'NAME', PR.MEASURUNIT_ID)), PMU.NAME) as F4
, (select PG.POST from PRODUCT_GROUP PG where PG.ID=PR.GROUP_ID) as F9
, (select sum(PQ.FREEQUANTITY) from PRODUCT_QUANTITY PQ where
((PQ.PRODUCT_ID=PR.ID) and (PQ.BACH_ID=PB.ID) and
(PQ.OBJECT_ID=PG.OBJECT_ID)))-rnull(PG.MINLIMIT) as F10
, rnull(0) as F11
, PR.PICTUREDATA as F15
, (select CTP.NAMEET from CUSTOM_PROD_TYPE CTP where CTP.ID=PR.A8) as F60
, (select MAX(FILENAME) from ATTACHMENT where (((TABLENAME='PRODUCT_BACH')
and (TABLEITEM_ID=PB.ID))or ((TABLENAME='PRODUCT') and
(TABLEITEM_ID=PR.ID))) and (TRIMX(UPPER(FILENAME)) like '%.PDF' )) as F24
, PR.A7 as F51
, PR.A10 as F54
, PR.A11 as F55
, PR.A12 as F56
, PR.A13 as F57
, PR.A14 as F58
, PR.A9 as F53
/*, PR.CUSTOM_DESCRIPTION as A53*/
from PRODUCT_BACH PB
left join PRODUCT PR on (PR.ID=PB.PRODUCT_ID)
left join PRODUCT_MEASUREMENT_UNIT PMU on (PMU.ID=PR.MEASURUNIT_ID)
left join PRODUCT_GROUP PG on (PG.ID=PR.GROUP_ID)
where ((PB.ID=7053) and (PR.ID=4517))";
$sth1=ibase_query($dbh, $sql);
while ($res = ibase_fetch_row($sth1)) {
print $res[0].'!';
}
--
Edit bug report at http://bugs.php.net/?id=40904&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=40904&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=40904&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=40904&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40904&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=40904&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40904&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40904&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40904&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40904&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40904&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=40904&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=40904&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40904&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40904&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40904&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40904&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40904&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40904&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40904&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40904&r=mysqlcfg