Edit report at https://bugs.php.net/bug.php?id=61142&edit=1

 ID:                 61142
 Updated by:         s...@php.net
 Reported by:        hinaresh2000 at gmail dot com
 Summary:            error : child pid 16289 exit signal Illegal
                     instruction (4) - if using SQLT_CHR
-Status:             Assigned
+Status:             Feedback
 Type:               Bug
 Package:            OCI8 related
 Operating System:   RHEL5.3
 PHP Version:        5.3.10
 Assigned To:        sixd
 Block user comment: N
 Private report:     N

 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------
[2012-02-22 15:15:46] 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-21 20:17:49] s...@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-20 11:39:32] 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-20 11:26:19] 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. 



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



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

Reply via email to