|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57323 db2_procedures & db2_ procedure_columns doesn't work on persistent connections
Submitted: 2006-10-26 16:34 UTC Modified: 2006-11-01 18:30 UTC
From: rhodesa at us dot ibm dot com Assigned: tessus (profile)
Status: Closed Package: ibm_db2 (PECL)
PHP Version: 5.1.4 OS: SUSE LINUX Enterprise Server 9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: rhodesa at us dot ibm dot com
New email:
PHP Version: OS:


 [2006-10-26 16:34 UTC] rhodesa at us dot ibm dot com
db2_procedures & db2_ procedure_columns does not work when connected with a persistent connection. When looking at the CVS I noticed that these two functions were retrieving the DB2 connection with the ZEND_FETCH_RESOURCE function while all the other functions used ZEND_FETCH_RESOURCE2 to get the DB connection. I updated the source to mimic the other functions and it works great now.

P.S. - The functions work fine when db2_connect is used instead

Reproduce code:
$cnx = db2_pconnect('db', 'user', 'pass', $options);
$r = db2_procedures($cnx,NULL,'SCHEMA','%%');

Expected result:
    [procedure_cat] => 
    [procedure_schem] => SCHEMA
    [procedure_name] => PROCNAME
    [num_input_params] => 2
    [num_output_params] => 1
    [num_result_sets] => 0
    [remarks] => 
    [procedure_type] => 1

Actual result:
Warning: db2_procedures(): supplied resource is not a valid Connection Resource resource

Warning: db2_fetch_assoc() expects parameter 1 to be resource, boolean given


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-27 12:58 UTC] helmut_tessarek at evermeet dot cx
I will look into it.
 [2006-11-01 18:30 UTC] kfbombar at us dot ibm dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

This bug has been fixed in CVS Head
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Dec 03 09:03:43 2022 UTC