php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #19687 ociexecute calling procedure with boolean out parameter
Submitted: 2002-10-01 06:54 UTC Modified: 2006-04-04 06:27 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: yk at teamlog dot com Assigned: maxim (profile)
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.2.1 OS: win 2k
Private report: No CVE-ID: None
 [2002-10-01 06:54 UTC] yk at teamlog dot com
PROBLEM OCIEXECUTE WITH BOOLEAN OUTPUT PARAMETERS:

The call to the following stored procedure (oracle 8.1.7) 
from php4.2.1 (as ampache module) 
does not work with a boolean parameter.
It works fine however when I change boolean to NUMBER.

/************ the procedure in PL SQL ********************/
PROCEDURE testit(arg1 IN OUT BOOLEAN) IS
BEGIN
  arg1:=TRUE;
END;
/*********************************************************/

/************ the call from PHP **************************/
$stmt = OCIParse($connector->_connectionID, "BEGIN testit(:arg1); END;");
OCIBindByName($stmt,":arg1",$ret,10);
OCIExecute($stmt);
OCIFreeStatement($stmt);
/*********************************************************/

/************ the warning in french :-) ******************/
Warning: OCIStmtExecute: ORA-06550: Ligne 1, colonne 7 : PLS-00306: num?ro ou types d'arguments erron?s dans appel ? 'TESTIT' ORA-06550: Ligne 1, colonne 7 : PL/SQL: Statement ignored in d:\apache\htdocs\iac\test.php on line 32
false

(traduction of the warning : wrong argument number or type)
/*********************************************************/

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-10 00:18 UTC] maxim@php.net
It is actually not a bug but rather the limitation of binding variables.

We hope to add it some time soon.

Maxim Maletsky
 [2002-11-10 14:52 UTC] maxim@php.net
I was planning to take over this one ...
 [2002-11-12 06:27 UTC] maxim@php.net
An update:

Oracle Call Interface specs say there are a few types that cannot be returned to client from DB. These are BOOLEAN, RECORD and INDEX TABLE.

So, for BOOLEAN to work with OCI8 extebsion there must be a wrapper added in some way that, still in PLSQL encodes/decodes BOOLEAN to/from NUMBER that can be returned to OCI8 extension and then used by PHP as PHP's BOOLEAN type.

In other words - this issue is not really any kind of bug but rather an expected behavior. Yet, I'd love to get it working somehow.

I reclassify it to the feature request and will work on it some time later.

Thanks,
Maxim Maletsky
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 18:01:31 2024 UTC