php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61142 error : child pid 16289 exit signal Illegal instruction (4) - if using SQLT_CHR
Submitted: 2012-02-20 11:26 UTC Modified: 2012-10-26 05:20 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: hinaresh2000 at gmail dot com Assigned: sixd (profile)
Status: No Feedback Package: OCI8 related
PHP Version: 5.3.10 OS: RHEL5.3
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: hinaresh2000 at gmail dot com
New email:
PHP Version: OS:

 

 [2012-02-20 11:26 UTC] hinaresh2000 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.oci-bind-array-by-name#refsect1-function.oci-bind-array-by-name-returnvalues
---
Hi, 
I am testing my application on Amazon Cloud Box where PHP 5.3.9 is installed on RHEL5.3
Below is my php source code line :
oci_bind_array_by_name($stmt, "filter_permissions", $filter_permissions_array, 10000,-1,SQLT_STR);

here $filter_permissions may or may not contain any value.
The above code line shows error in /var/log/httpd/error_log file that
"child pid 16289 exit signal Illegal instruction (4)" 
and browser stops and shows blank page.

The same line is working fine with PHP 5.1.6 and showing results perfectly. 
Also if it fails somewhere on any version then i have replaced SQLT_STR with SQLT_CHR and it works fine. In that case i am not in a position to fix this issue in 5.3.9.
Is this a PHP issue or the OCI one?
help me resolving this issue. 

Thanks in Advance
Naresh K.

Test script:
---------------
Below is my php source code line :
oci_bind_array_by_name($stmt, "filter_permissions", $filter_permissions_array, 10000,-1,SQLT_STR);

here $filter_permissions may or may not contain any value.
The above code line shows error in /var/log/httpd/error_log file that
"child pid 16289 exit signal Illegal instruction (4)" 
and browser stops and shows blank page.


Expected result:
----------------
It should run without any error in log and doesn't stop the functionlity of page at browser. 


Actual result:
--------------
Error in log -
"child pid 16289 exit signal Illegal instruction (4)" 
and browser stops and shows blank page. 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-02-20 11:39 UTC] hinaresh2000 at gmail dot com
Also i have tested it on another box having php 5.3.9 - (built: Jan 12 2012 15:14:33) then i saw below error in log:
"child pid 7758 exit signal Segmentation fault (11)"
 [2012-02-21 20:17 UTC] sixd@php.net
-Status: Open +Status: Feedback
 [2012-02-21 20:17 UTC] sixd@php.net
I need:

1. A complete PHP test script showing the values (if any) in 
$filter_permissions_array.

2. The SQL to create any DB objects used.

3. The versions of the Oracle client libraries and of the database.

Thanks.
 [2012-02-21 21:43 UTC] sixd@php.net
-Assigned To: +Assigned To: sixd
 [2012-02-22 15:15 UTC] hinaresh2000 at gmail dot com
Below is my code snippet which i am using : 
$filter_permissions_array = "permissions\n";
$conn=db_connection();
$query = "BEGIN dns_filter_permissions_pkg.insert_customize_brand(:iprange, :is_apply_to_networks_of_nop, :network_filter_id, :ip_check, :filter_permissions, :network_cursor, :return_value); END;";
$stmt = oci_parse($conn, $query);
$network_cursor = oci_new_cursor($conn);
oci_bind_by_name($stmt, "iprange", $ip_cidr_range,20);
oci_bind_by_name($stmt, "is_apply_to_networks_of_nop", $set_network_operator, 225);
oci_bind_by_name($stmt, "network_filter_id", $network_filter_id, 10);
oci_bind_by_name($stmt, "ip_check", $ip_check, 10);
oci_bind_array_by_name($stmt, "filter_permissions", $filter_permissions_array, 10000,-1,SQLT_STR);
oci_bind_by_name($stmt, "network_cursor",  $network_cursor,  -1, OCI_B_CURSOR);
oci_bind_by_name($stmt, "return_value", $return_value, 10);
oci_execute($stmt);
oci_execute($network_cursor);
oci_free_statement($stmt);
oci_close($conn);

The oracle version is 11.2.0.3.0
PHP version is 5.3.9

Thanks, 
Naresh
 [2012-02-22 15:15 UTC] hinaresh2000 at gmail dot com
-Status: Feedback +Status: Assigned
 [2012-02-23 21:27 UTC] sixd@php.net
Without a reproducible testcase (see my previous request #2) I can
only comment on the code:

1. You need error checking in the code.

2. You need SQLT_CHR instead of SQLT_STR in the oci_bind_array_by_name
   call.

3. You should specify the maximum data length instead of -1 in the
   oci_bind_array_by_name call.  Otherwise the length of
   "permissions\n" is used and you might see "ORA-06502 PL/SQL:
   numeric or value error: host bind array too small", depending on
   your schema (again, see my previous request #2).

I can look at this again if I get a complete reproducible testcase.
 [2012-02-23 21:27 UTC] sixd@php.net
-Status: Assigned +Status: Feedback
 [2012-10-26 05:20 UTC] sixd@php.net
-Status: Feedback +Status: No Feedback
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Feb 09 07:05:47 2023 UTC