ID: 41419
Updated by: [EMAIL PROTECTED]
Reported By: dmoree at coker dot edu
-Status: Open
+Status: Bogus
Bug Type: PDO related
Operating System: Fedora Core 6
PHP Version: 5.2.2
New Comment:
This PDO driver is not a part of PHP or PECL, please report all related
issues to its developers.
Previous Comments:
------------------------------------------------------------------------
[2007-05-17 18:04:27] dmoree at coker dot edu
Description:
------------
I am using some PDO code obtained from IBM. This PDO driver allows for
PHP to connect to IBM UniData and UniVerse databases. This code does
work as I've been talking to the developer of it for the past 2 weeks
and he as also ran my code which has worked. I have done a call stack on
it and will place it below.
#0 0x00c81b8c in memcpy () from /lib/libc.so.6
#1 0x080e7af0 in u2_prepare (S=0xa33393c,
sql=0xa333834 "CALL PDOSUB ? ? ? \n?", sql_len=20)
at /root/php-5.1.6/ext/pdo_u2/u2_driver.c:798
#2 0x080e7c24 in u2_handle_preparer (dbh=0xa33082c,
sql=0xa333834 "CALL PDOSUB ? ? ? \n?", sql_len=20, stmt=0xa333404,
driver_options=0x0) at /root/php-5.1.6/ext/pdo_u2/u2_driver.c:833
#3 0x080e184c in zif_PDO_prepare (ht=1, return_value=0xa33098c,
return_value_ptr=0x0, this_ptr=0xa3218b4, return_value_used=1)
at /root/php-5.1.6/ext/pdo/pdo_dbh.c:557
#4 0x082199fb in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfc2c160)
at /root/php-5.1.6/Zend/zend_vm_execute.h:200
#5 0x0821aafd in execute (op_array=0xa32b79c)
at /root/php-5.1.6/Zend/zend_vm_execute.h:92
#6 0x081fead8 in zend_execute_scripts (type=8, retval=<value optimized
out>,
file_count=3) at /root/php-5.1.6/Zend/zend.c:1109
#7 0x081c37b4 in php_execute_script (primary_file=0xbfc2e590)
at /root/php-5.1.6/main/main.c:1737
#8 0x08275636 in main (argc=2, argv=0xbfc2e6e4)
at /root/php-5.1.6/sapi/cli/php_cli.c:1093
Reproduce code:
---------------
<?php
// UniData DSN
$dsn = "u2:dbtype=ud;host=10.40.0.16;acct=Collive";
$user = "dmoree";
$pass = "dewwater";
echo "<h2>UniData HTTP Query</h2>\n";
try{
$db = new PDO($dsn, $user, $pass);
}catch (PDOException $e){
if(strpos($e->getMessage(), "80011") > 0){
echo "Error: Invalid username or password!";
exit();
}elseif(strpos($e->getMessage(), "39129") > 0){
echo "Error: Not a valid account name!";
exit();
}
echo "Error: ".$e->getMessage();
exit();
}
$statement = $db->prepare("CALL PDOSUB :xcode :xparams :xoutdata
:xoutcode");
$db = null;
?>
Expected result:
----------------
Should just prepare the statement for execution.
Actual result:
--------------
Upon PHP reaching the prepare statement line it crashes with a
segmentation fault. If I run the statement as a query instead of
preparing it, it functions fine. If I prepare the statement without the
word CALL it functions fine. I have done lots of test over the past 2
days and have singled it down the the word CALL being in the prepare
statement. For some reason, if CALL is put into the prepare statement,
it crashes. It is isolated to the word CALL only.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41419&edit=1