From: johnny at gorilla dot com dot tw
Operating system: Solaris 9
PHP version: 5.0.4
PHP Bug Type: OCI8 related
Bug description: PHP crashes while retrieving data from Oracle
Description:
------------
I think this bug is simular to Bug #6561 but in Solaris
I've test 3 different version of php in CGI/CLI mode all happended.
Here is my enviornment & configuration:
Sun V240(sparc)
Solaris 9
gcc 3.4.2
Oracle 9.2.0.4
php 4.3.11
CFLAGS="`getconf LFS_CFLAGS`" ./configure --prefix=/usr/local/php4
--with-oci8=/data/oracle/OraHome1 --with-ncurses=/usr/local/lib
--enable-pcntl --with-readline=/usr/local/lib --enable-mbstring=all
php 5.0.3
CFLAGS="`getconf LFS_CFLAGS`" ./configure --prefix=/usr/local/php5
--with-oci8=/data/oracle/OraHome1 --with-ncurses=/usr/local/lib
--enable-pcntl --with-readline=/usr/local/lib --enable-mbstring=all
php 5.0.4
CFLAGS="`getconf LFS_CFLAGS`" ./configure --prefix=/usr/local/php5
--with-oci8=/data/oracle/OraHome1 --with-ncurses=/usr/local/lib
--enable-mbstring=all (cannot build with --enable-pcntl
--with-readline=/usr/local/lib)
modified
1. <phpdir>/configure
2. <phpdir>/ext/oci8/config.m4
OCI8_DIR/lib -> OCI8_DIR/lib32
OCI8_DIR/rdbms/lib -> OCI8_DIR/rdbms/lib32
CGI/CLI crashed (core dumped) at some CLOB field
at ociFetchInto when ociFetchInto with OCI_RETURN_LOBS, and crashed at
->load() when ociFetchInto without OCI_RETURN_LOBS, same code runs fine is
PHP4/PHP5 on windows
Reproduce code:
---------------
Very hard to reproduce exactly. It happens while retrieving data from an
Oracle 8 database. The same code works fine in Windows Environment.
Expected result:
----------------
$query = "SELECT field1, clob1, field2 FROM table1";
$stmt = OCIParse ($conn, $query);
OCIExecute($stmt, OCI_DEFAULT);
while( true )
{
if( !OCIFetchInto($stmt, $arr, OCI_ASSOC|OCI_RETURN_LOBS) )
break;
while( list($key,$val)=each($arr) )
{
echo "Key:".$key."\tVal:".$val."\n";
}
echo "\n";
}
Actual result:
--------------
Key: xxxx Val: yyyyyy
Key: xxxx Val: yyyyyy
Key: xxxx Val: yyyyyy
Key: xxxx Val: yyyyyy
....
--
Edit bug report at http://bugs.php.net/?id=33383&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33383&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=33383&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=33383&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33383&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33383&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33383&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33383&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33383&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33383&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33383&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=33383&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=33383&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33383&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33383&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33383&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33383&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33383&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33383&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33383&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33383&r=mysqlcfg