|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-29 11:06 UTC] christopher dot jones at oracle dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 04:00:01 2025 UTC |
Description: ------------ Calling Oracle stored procedure cause the apache http daemon segmentation fault on FreeBSD6-STABLE box. Used software: ZendOptimizer-2.6.0 apache-2.2.0_4 oracle8-client-0.1.1_1 pecl-PDO-1.0.2 pecl-PDO_OCI-1.0 php5-5.1.1 Reproduce code: --------------- <?php $dbh = new PDO("oci:dbname=dbhost", 'user, 'pass'); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "CALL sp_test('p1','p2','p3',?,?)"; $stmt = $dbh->prepare($sql); $out_param1 = "a"; $out_param2 = "a"; $stmt->bindParam(1,$out_param1,PDO::PARAM_STR, 1024); $stmt->bindParam(2,$out_param2,PDO::PARAM_STR, 1024); $stmt->execute() // <===== !!! this is line 14 or die ("<pre>Execution error:\n" . print_r($dbh->errorInfo(), true)); $dbh = null; print $out_param1 . " ". $out_param2; ?> Expected result: ---------------- This code should print in a browser window two strings returned from SP. In my case - "Stored" and "procedure" Actual result: -------------- I'm failed to produce backtrace because gbd coredumps: # ulimit -c unlimited # gdb httpd GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"... (gdb) run -DNOHTTPACCEPT -X Starting program: /usr/local/sbin/httpd -DNOHTTPACCEPT -X warning: Unable to get location for thread creation breakpoint: generic error [New LWP 100359] [New Thread 0x80b0000 (LWP 100359)] gdb in realloc(): error: pointer to wrong page Abort trap (core dumped) In apache error log: [Thu Dec 29 11:32:13 2005] [error] [client x.x.x.x] PHP Warning: PDOStatement::execute() [<a href='function.execute'>function.execute</a>]: param is NULL in oci_bind_input_cb; this should not happen in /u01/www/www.myhost.ru/test_sp.php on line 14 [Thu Dec 29 11:32:13 2005] [error] [client x.x.x.x] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 24343 OCIStmtExecute: ORA-24343: user defined callback error\n (/usr/obj/usr/ports/databases/pecl-PDO_OCI/work/PDO_OCI-1.0/oci_statement.c:142)' in /u01/www/www.myhost.ru/test_sp.php:14\nStack trace:\n#0 /u01/www/www.myhost.ru/test_sp.php(14): PDOStatement->execute()\n#1 {main}\n thrown in /u01/www/www.myhost.ru/test_sp.php on line 14