php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36331 PHP 5.1.2 SAPI crashed Apache during OCI_PARSE execution
Submitted: 2006-02-08 07:12 UTC Modified: 2006-02-08 10:22 UTC
From: v_afan at fareastone dot com dot tw Assigned:
Status: Closed Package: Apache2 related
PHP Version: 5.1.2 OS: Windows XP SP2 (zh-TW)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: v_afan at fareastone dot com dot tw
New email:
PHP Version: OS:

 

 [2006-02-08 07:12 UTC] v_afan at fareastone dot com dot tw
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-08 09:17 UTC] tony2001@php.net
Please try using this CVS snapshot:

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


 [2006-02-08 10:11 UTC] v_afan at fareastone dot com dot tw
Apparently using the latest cvs build the script works without crashing apache (worked as expected).  Thanks.  I think it might be an isolated bug in 5.1.2.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Nov 27 15:05:53 2022 UTC