From:             bteissier at tennaxia dot com
Operating system: Win 2K3
PHP version:      5.2.5
PHP Bug Type:     OCI8 related
Bug description:  Apache Crash during oci_execute with fault address 0X000baee7

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 bug report at http://bugs.php.net/?id=43563&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43563&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43563&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43563&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43563&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=43563&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=43563&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=43563&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=43563&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=43563&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=43563&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=43563&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=43563&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=43563&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=43563&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43563&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=43563&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=43563&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=43563&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43563&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=43563&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=43563&r=mysqlcfg

Reply via email to