ID: 39820 User updated by: alien at mosfasad dot ru Reported By: alien at mosfasad dot ru Status: Open Bug Type: PDO related Operating System: win xp PHP Version: 5.2.0 New Comment:
i can temporary resolve this problem by this code: $sSql = 'call ReportOrder( :out0, :var0 , :var1)'; $sOut = ' '; $sVar0 = null; $aArguments = Array ('var0' =>'asdasasdasd','var1' =>'3242424' ); $sDsn = 'oci:dbname=********'; $sUser = '***'; $sPass = '*******'; $aArgs = array(); $oPDOs = new PDO($sDsn,$sUser,$sPass,$aArgs); $oStat = $oPDOs->prepare( $sSql ); $oStat->bindParam('out0', $sOut, PDO::PARAM_STR,strlen( $sOut ) ); /* !!!!!! this CODE !!!!*/ $oStat->bindParam('var0',$sVar0 ); $oStat->bindParam('var1',$sVar0 ); /* !!!!!!********!!!!*/ $oStat->execute($aArguments); echo '['.$sOut.']'; ?> PLSQL PROC : CREATE OR REPLACE PROCEDURE ReportOrder ( dCalcId OUT VARCHAR2, dFormId VARCHAR2, dFormId1 VARCHAR2 ) IS BEGIN dCalcId := dFormId || dFormId1; END; Previous Comments: ------------------------------------------------------------------------ [2007-01-09 15:10:15] alien at mosfasad dot ru !!! WRONG !!! : /* !!! IF COMMENT LINE BELOW, NO ERROR */ $oPDOs->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); /**/ if i comment this lines error i can look error, when i call method errorInfo( )! print_r( $oStat->errorInfo( ) ); ------------------------------------------------------------------------ [2006-12-25 12:12:48] alien at mosfasad dot ru $sSql = 'call ReportOrder(:var0,:out0,:var1,:var2,:var3)'; CREATE OR REPLACE PROCEDURE ReportOrder ( dFormId NUMBER, dCalcId OUT VARCHAR2, sUnionDescr VARCHAR2, sArgsName VARCHAR2, sColsName VARCHAR2 ) IS BEGIN dCalcId := '1'; END; ------------------------------------------------------------------------ [2006-12-25 11:21:54] [EMAIL PROTECTED] >If the script requires a database to demonstrate the issue, >please make sure it creates all necessary tables, stored >procedures etc. ------------------------------------------------------------------------ [2006-12-25 11:18:32] alien at mosfasad dot ru ini_set('display_errors','on'); $sSql = 'call wb_utils.ReportOrder(:var0,:out0,:var1,:var2,:var3)'; $sOut = ' '; $aArguments = Array ( 'var0' => 24277102, 'var1' => '', 'var2' => 'args', 'var3' => 'cols' ); $sDsn = 'oci:dbname=//saturn.icon3.ru/mito'; $sUser = 'XXX'; $sPass = 'XXXXXX'; $aArgs = array(); $oPDOs = new PDO($sDsn,$sUser,$sPass,$aArgs); /* !!! IF COMMENT LINE BELOW, NO ERROR */ $oPDOs->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); /**/ $oStat = $oPDOs->prepare( $sSql ); $oStat->bindParam('out0',$sOut, PDO::PARAM_STR,strlen( $sOut ) ); $oStat->execute($aArguments); echo '['.$sOut.']'; ------------------------------------------------------------------------ [2006-12-18 08:40:51] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/39820 -- Edit this bug report at http://bugs.php.net/?id=39820&edit=1