#43563 [Opn->Fbk]: Apache Crash during oci_execute with fault address 0X000baee7

From: Date: Tue, 11 Dec 2007 19:57:24 +0000
Subject: #43563 [Opn->Fbk]: Apache Crash during oci_execute with fault address 0X000baee7
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-120577@lists.php.net to get a copy of this message
 ID:               43563
 Updated by:       sixd@php.net
 Reported By:      bteissier at tennaxia dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         OCI8 related
 Operating System: Win 2K3
 PHP Version:      5.2.5
 New Comment:

I couldn't reproduce this - though I was using Linux and Instant Client
11g.

Does the crash happen consistently?  Does it happen if you run the
script in CLI?  Does it happen to databases on other platforms or
versions? Does it happen in SQL*Plus, . . .


Previous Comments:
------------------------------------------------------------------------

[2007-12-11 14:28:06] bteissier at tennaxia dot com

The snaphot does not solve the problem.
My company also used Zend Core for Oracle but had the same problem.

------------------------------------------------------------------------

[2007-12-11 10:53:22] jani@php.net

Please try using this CVS snapshot:

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

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi



------------------------------------------------------------------------

[2007-12-11 10:44:58] bteissier at tennaxia dot com

Oracle server on HP UX, not AIX

------------------------------------------------------------------------

[2007-12-11 09:10:54] bteissier at tennaxia dot com

Description:
------------
Executing a simple request on a "normal" table makes Apache / php
crash.
Cannot reproduce the error with the same app server but oracle on
WIN2K3.

Apache crashes with this event log in windows:
Faulting application httpd.exe version 2.2.4.0, faulting module
orageneric10.dll, version 10.2.0.1, fault address 0X000baee7

Application server:
Wamp 1.7.3 with
apache 2.2.4
Php 5.2.5
Oci version 1.2.4 Revision: 1.269.2.16.2.38
Oracle client 10.2 (same with 9.2)

Oracle server:
Oracle 10.1.0.3 on AIX
No use of db_link


Reproduce code:
---------------
<?php
        error_reporting(255);
        $db =
OCI_NEW_CONNECT(user,password,"(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=myservice)))");
        if(!$db)
                die("oci_connect error");

        //this doesnt crash
        //$s = oci_parse($db,"select * from champs WHERE
table_field='cf_resp_site.id_user' and link_order_by is not null ");
        
        //this crashes
        $s = oci_parse($db,"select * from champs WHERE
table_field='cf_resp_site.id_user'");
        oci_execute($s);

        oci_fetch_all($s,$res);
        echo '<pre>';
        print_r($res);
        oci_close($db);
?>


To create the table:

CREATE TABLE CHAMPS ( 
	TABLE_FIELD      	VARCHAR2(80) NOT NULL,
	CHAMP_OBLIGATOIRE	NUMBER(3,0) DEFAULT 1 NOT NULL,
	CHAMP_TYPE       	VARCHAR2(100) DEFAULT 'text' NOT NULL,
	CHAMP_LONGUEUR   	NUMBER(5,0) DEFAULT 0 NOT NULL,
	LINK_TABLE       	VARCHAR2(1024) NULL,
	LINK_FIELD       	VARCHAR2(255) NULL,
	LINK_VIEW        	VARCHAR2(255) NULL,
	LINK_WHERE       	VARCHAR2(1000) NULL,
	LINK_ORDER_BY    	VARCHAR2(100) NULL,
	LINK_WEAK        	NUMBER(8,0) NULL,
	VALIDATION       	VARCHAR2(255) NULL 
	);

CREATE UNIQUE INDEX TABLE_FIELD
	ON CHAMPS(TABLE_FIELD);

INSERT INTO CHAMPS(TABLE_FIELD, CHAMP_OBLIGATOIRE, CHAMP_TYPE,
CHAMP_LONGUEUR, LINK_TABLE, LINK_FIELD, LINK_VIEW, LINK_WHERE,
LINK_ORDER_BY, LINK_WEAK, VALIDATION)
  VALUES('cf_resp_site.id_user', 0, 'multi_select', 8, 'entreprises,
all_user, users_access_sites uas, access_sites', 'id_entreprise',
'prenom, nom',
'access_sites.id_cf_site=''".$this->data_more[''id_site'']."''
AND
uas.id_user=entreprises.id_entreprise AND
uas.id_access_site=access_sites.id_access_site AND
uas.id_access_tree=".$_SESSION[''id_access_tree'']." AND
all_user.id_user = entreprises.id_entreprise AND all_user.allowed =
''1''', 'prenom, nom', 0, NULL);


Expected result:
----------------
A resultset containing all the columns of the table

Actual result:
--------------
An Apache Crash, no error log but an event log in Windows


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43563&edit=1


Thread (9 messages)

« previous php.bugs (#120577) next »