#36318 [Opn->Fbk]: Core Dump when using bindParam with PDO_OCI
ID: 36318
Updated by: tony2001@php.net
Reported By: bernhard dot hari at multisports dot ch
-Status: Open
+Status: Feedback
Bug Type: PDO related
Operating System: RedHat Linux Enterprise 4 Upd 2
PHP Version: 5.1.2
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.1-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.1-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2006-02-07 13:18:00] bernhard dot hari at multisports dot ch
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 this bug report at http://bugs.php.net/?id=36318&edit=1
Thread (9 messages)