Bug #76092 [NEW]: oci_pconnect returns different errors than oci_connect for unbound binds

From: Date: Tue, 13 Mar 2018 16:48:50 +0000
Subject: Bug #76092 [NEW]: oci_pconnect returns different errors than oci_connect for unbound binds
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214338@lists.php.net to get a copy of this message
From: robert dot ctr dot berkstresser at faa dot gov Operating system: Windows 7 PHP version: 7.2.3 Package: OCI8 related Bug Type: Bug Bug description:oci_pconnect returns different errors than oci_connect for unbound binds Description: ------------ Issue reproduced using PHP 7.1.13 and 7.2.3 x64 Thread Safe builds from https://windows.php.net/download#php-7.2, OCI8 2.1.8 7.2 x64 from PECL and php.ini-development ini. Hosted on Apache 2.4.29 as a module. Additional extensions: php_xdebug-2.6.0-7.2-vc15-x86_64.dll When code similar to the test script is run within my application the ORA-24343 and Invalid phpbind pointer errors are generated AND php crashes producing this backtrace. *********************** * EXCEPTION DETAILS * *********************** DetailID = 1 Count: 2 Exception #: 0XC0000005 Stack: OraOCIEI11!lxgcvp+0x5d47 OraOCIEI11!sigpidu+0x1ea89 OraOCIEI11!sigpidu+0x11e88 OraOCIEI11!sigpidu+0x2a2b OraOCIEI11!ztub64d+0x28b26 OraOCIEI11!upicui2+0x9a8 OraOCIEI11!upirtr+0xad OraOCIEI11!kpurcsc+0x96 OraOCIEI11!kadgetembtype+0xda30 OraOCIEI11!OCIStmtExecute+0x46 OCI!OCIStmtExecute+0xb7 php_oci8!get_module+0x1087a php_oci8!get_module+0x994b php_xdebug_2_6_0_7_2_vc15_x86_64+0x781e php7ts!libiconv_set_relocation_prefix+0x190d8 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x190a5 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x19679 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x19679 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x19679 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x19679 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x19679 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x19679 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!libiconv_set_relocation_prefix+0x19679 php7ts!zend_throw_exception_ex+0x2502a php7ts!execute_ex+0xbf php_xdebug_2_6_0_7_2_vc15_x86_64+0x7086 php7ts!zend_execute+0x1c8 php7ts!zend_execute_scripts+0xb7 php7ts!php_execute_script+0x262 php7apache2_4+0x3daa libhttpd!ap_run_handler+0x35 libhttpd!ap_invoke_handler+0x10f libhttpd!ap_internal_redirect_handler+0x29a libhttpd!ap_process_request+0x17 libhttpd!ap_byterange_filter+0x1501 libhttpd!ap_run_process_connection+0x35 libhttpd!ap_process_connection+0x45 libhttpd!ap_run_generate_log_id+0x3d53 kernel32!BaseThreadInitThunk+0xd ntdll!RtlUserThreadStart+0x1d Test script: --------------- <?php $dbc_pass = oci_pconnect('USER', 'PASS', 'DEVBOX'); $bind_value = 'TEST'; $stmt_pass = oci_parse($dbc_pass, "select * from (SELECT 'TEST' as t1 from dual) where t1 = :BND"); oci_bind_by_name($stmt_pass, 'BND', $bind_value, -1, SQLT_CHR); oci_execute($stmt_pass); oci_free_statement($stmt_pass); oci_rollback($dbc_pass); oci_close($dbc_pass); unset($stmt_pass); unset($dbc_pass); $dbc_fail = oci_pconnect('USER', 'PASS', 'DEVBOX'); $stmt_fail = oci_parse($dbc_fail, "select * from (SELECT 'TEST' as t1 from dual) where t1 = :BND"); oci_execute($stmt_fail); oci_free_statement($stmt_fail); oci_rollback($dbc_fail); oci_close($dbc_fail); unset($stmt_fail); unset($dbc_fail); ?> Expected result: ---------------- Warning: oci_execute(): ORA-01008: not all variables bound in php_test.php on line 15 Call Stack: 0.0000 398304 1. {main}() php_test.php:0 0.2340 398856 2. oci_execute() php_test.php:15 Actual result: -------------- Warning: oci_execute(): Invalid phpbind pointer value in php_test.php on line 15 Call Stack: 0.0000 398304 1. {main}() php_test.php:0 0.1248 398568 2. oci_execute() php_test.php:15 Warning: oci_execute(): ORA-24343: user defined callback error in php_test.php on line 15 Call Stack: 0.0000 398304 1. {main}() php_test.php:0 0.1248 398568 2. oci_execute() php_test.php:15 -- Edit bug report at https://bugs.php.net/bug.php?id=76092&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76092&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76092&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76092&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76092&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76092&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76092&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76092&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76092&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76092&r=support Expected behavior: https://bugs.php.net/fix.php?id=76092&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76092&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76092&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76092&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76092&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76092&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76092&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76092&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76092&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76092&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76092&r=mysqlcfg

« previous php.bugs (#214338) next »