#36318 [NEW]: Core Dump when using bindParam with PDO_OCI

From: Date: Tue, 07 Feb 2006 12:18:02 +0000
Subject: #36318 [NEW]: Core Dump when using bindParam with PDO_OCI
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-93010@lists.php.net to get a copy of this message
From: bernhard dot hari at multisports dot ch Operating system: RedHat Linux Enterprise 4 Upd 2 PHP version: 5.1.2 PHP Bug Type: PDO related Bug description: Core Dump when using bindParam with PDO_OCI Description: ------------ When using a named parameters array, PDO_OCI crashes. --> using bindParam() = crash --> using bindValue() = works (also with 5.1.2) The following code works fine in 5.1.0. But fails with 5.1.1, 5.1.2 and the snapshot php5.1-200602070530. This Bug is similar to #35671. System: RedHat Enterprise Linux 4 Update 2. Oracle 10gr2 (10.2.0.1) with Patch 4516865 (Patch solves wrong permissions after installation.) Same compile options, configuration and environment for all tested PHP Versions. Reproduce code: --------------- $database = new PDO('oci:','scott','tiger'); $database->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); $query = "select machine from v\$session where osuser = :username"; $statement = $database->prepare($query); $username = 'harb'; //$statement->bindValue(':username', $username); $statement->bindParam(':username', $username); //$statement->bindParam(':username', $username, PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT); $result = $statement->execute(); if($result == true) { $rows = $statement->fetchAll(PDO::FETCH_NUM); print_r($rows); } else { print_r($statement->errorInfo()); } Expected result: ---------------- The (local) machine hostname. e.g. Array ( [0] => Array ( [0] => mdsl03 ) ) Actual result: -------------- [harb@mdsl03 dataAccessComponent]$ /opt/php5.1.0/bin/php Test.php Array ( [0] => Array ( [0] => mdsl03 ) ) [harb@mdsl03 dataAccessComponent]$ php Test.php Segmentation fault (core dumped) [harb@mdsl03 dataAccessComponent]$ php --version PHP 5.1.2 (cli) (built: Jan 26 2006 08:55:32) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies -- Edit bug report at http://bugs.php.net/?id=36318&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36318&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36318&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36318&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36318&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36318&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36318&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36318&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36318&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36318&r=support Expected behavior: http://bugs.php.net/fix.php?id=36318&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36318&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36318&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36318&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36318&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36318&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36318&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36318&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36318&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36318&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36318&r=mysqlcfg

« previous php.bugs (#93010) next »