php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57563 Preparing procedure and executing segfaults
Submitted: 2007-03-07 08:07 UTC Modified: 2007-05-07 19:10 UTC
From: vlads at krediidiinfo dot ee Assigned:
Status: Not a bug Package: PDO_INFORMIX (PECL)
PHP Version: 5.2.1 OS: SUSE Linux 9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
27 + 49 = ?
Subscribe to this entry?

 
 [2007-03-07 08:07 UTC] vlads at krediidiinfo dot ee
Description:
------------
Preparing procedure and executing it as shown in the manual results in segmentation fault.

Reproduce code:
---------------
$ifx = new PDO('informix:host=db.kisise;service=1526;database=krediit;server=db_krediit;protocol=onsoctcp; EnableScrollableCursors=0','someuse','somepass');
$tmp->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$tmp->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_TO_STRING);

try
{
  $ret = '';
  $stmt = $ifx->prepare('execute procedure proc_esmakanne(today-1,today)');
  $stmt->bindParam(1, $ret, PDO::PARAM_STR, 4000); 
  $stmt->execute();
}
catch (Exception $dbe) {}


Expected result:
----------------
Variable $ret has some value

Actual result:
--------------
segfault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-23 11:59 UTC] tom at advancedatatools dot com
If you have not tried to do so already, upgrade to 1.1.0, that fixed a number of the bugs I was having with bindParam.
 [2007-03-23 12:07 UTC] kfbombar at us dot ibm dot com
Does the upgrade resolve this issue and/or issue 10281?  Please let us know.
 [2007-03-23 12:11 UTC] vlads at krediidiinfo dot ee
This is a bug report for 1.1.0, the same applies to 10281.
 [2007-05-07 19:10 UTC] opendev at us dot ibm dot com
The script provided will need to be tweaked a bit for it to work correctly.  The primary problem is in the attempt to prepare and execute a "EXECUTE PROCEDURE".  This can only be done by direct execution.  So a slight modification on your script will fix this.  For example:

$query = 'EXECUTE PROCEDURE proc_esmakanne(today-1, today)';
$stmt = $conn->query($query);
$res = $stmt->fetch();
var_dump($res);

This will provide your needed output.  We hope this clarifies the issue.  Thank you.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Dec 07 11:01:24 2019 UTC