#31039 [NEW]: ocifetchstatement Crashes php when clob length is > 0 && < 3
| From: | ahmad dot ali at eedo dot com | Date: | Thu, 09 Dec 2004 16:44:13 +0000 |
| Subject: | #31039 [NEW]: ocifetchstatement Crashes php when clob length is > 0 && < 3 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-69981@lists.php.net to get a copy of this message | ||
From: ahmad dot ali at eedo dot com
Operating system: Linux
PHP version: 4.3.8
PHP Bug Type: OCI8 related
Bug description: ocifetchstatement Crashes php when clob length is > 0 && < 3
Description:
------------
THIS IS A CRITICAL bug that is related to 14702 bug but was never
followed. Whenever your do a select statement on a clob field (on a linux
box) that has a length of less then 3 characters but more then 0 it will
crash php. If you need more info please email me at ahmad.ali@eedo.com. We
have clients running on oracle and are now stuck with no solutions.
Reproduce code:
---------------
if(!$port) $port = '1521';
$tns = "
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=$host)(PORT=$port)))(CONNECT_DATA=(SID=$dbname)))";
$conn = ocilogon('xxxxx','xxxxx',$tns);
$SQL = "SELECT MYCLOBFIELD FROM CLOBTABLE";
$Result = ociparse($conn,$SQL);
while(ocifetchinto($result, &$resultarray,
OCI_RETURN_NULLS + OCI_RETURN_LOBS))
{
// It crashes before it even gets here
}
Expected result:
----------------
not too crash and return the result from ocifetchinto.
Actual result:
--------------
Page not found (PHP crashes)
--
Edit bug report at http://bugs.php.net/?id=31039&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31039&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31039&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31039&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31039&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31039&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31039&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31039&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31039&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31039&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31039&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31039&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31039&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31039&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31039&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31039&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31039&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31039&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31039&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31039&r=mysqlcfg