From: v_afan at fareastone dot com dot tw
Operating system: Windows XP SP2 (zh-TW)
PHP version: 5.1.2
PHP Bug Type: Apache2 related
Bug description: PHP 5.1.2 SAPI crashed Apache during OCI_PARSE execution
Description:
------------
I am aware that the issue is reported by someone else on prior versions of
PHP 5.x, and I am aware the issue is reportedly resolved, but the crash
problem of the PHP 5.x SAPI for Apache appears to have risen again.
I used the following code on PHP 5.1.2 (SAPI) on both Apache 2.0 (official
binaries) and 2.2 (compiled SAPI module with VC .Net 2003) on Windows XP
SP2, and Apache would crash with a Windows dialog box that indicates the
crash. Through trial and error through comment blocks, I found that
Apache crashed upon executing "OCI_PARSE($conn,$sql);", where
the connection to the Oracle DB server via a local client appears to have
been successful (Oracle client 8.1.7.0.0 connecting to Oracle server
8.1.7.4.0).
Interestingly though, the following code does work successfully (as
expected) for both Apache 2.0 and 2.2 when used in conjunction with their
corresponding PHP SAPI modules from PHP 5.1.1 on the same combination of
OS, compiler, oracle client and server, with the same php.ini.
My configure command is as follows:
cscript Configure.js --enable-apache2handler
Thanks for the time, and I would still like to thank the PHP devs on their
works on this great program.
Reproduce code:
---------------
<?
$un = 'someone';
$pw = 'foo';
$db = 'somedb';
$conn = oci_connect($un, $pw, $db);
if (!$conn)
{
echo("DB Connection failed!");
exit;
}
$dev_id = $_POST["dev_id"];
$sql = 'SELECT FOO FROM SOME_TABLE WHERE DEV_ID = :DEV';
$qry = OCI_PARSE($conn,$sql);
OCI_BIND_BY_NAME($qry, ":DEV", $dev_id, -1);
OCI_EXECUTE($qry);
?>
Expected result:
----------------
Data from column FOO of SOME_TABLE be retrieved according to the DEV_ID
supplied
Actual result:
--------------
Httpd.exe crashed on execution of "$qry = OCI_PARSE($conn, $sql);" with
oracle client dll.
--
Edit bug report at http://bugs.php.net/?id=36331&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=36331&r=trysnapshot44
Try a CVS snapshot (PHP 5.1):
http://bugs.php.net/fix.php?id=36331&r=trysnapshot51
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=36331&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36331&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=36331&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36331&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36331&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36331&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36331&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36331&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=36331&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=36331&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36331&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36331&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36331&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36331&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36331&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36331&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36331&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36331&r=mysqlcfg