ID:               14024
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Closed
 Bug Type:         OCI8 related
 Operating System: linux;kernel-2.4.x
 PHP Version:      4.0.6
 New Comment:

This should be documented... I've lost countless hours on this problem
;-)


Previous Comments:
------------------------------------------------------------------------

[2002-04-13 08:58:53] [EMAIL PROTECTED]

set the oracle env vars _before_ you start apache. PutEnv will not
work.


------------------------------------------------------------------------

[2001-11-12 02:30:03] [EMAIL PROTECTED]

After execution of the script bellow and any other script 
the php4 return:
Warning: OCIStmtExecute: ORA-03106: fatal two-task 
communication protocol error in 
/var/www/admin/sqlexecute.phtml on line 45
// line 45 is: ociexecute($stmt,OCI_DEFAULT);

putenv("ORACLE_SID=ORCL");
putenv("ORACLE_HOME=/home/oracle/u01/oracle/product/9.0.1");
putenv("LD_LIBRARY_PATH=/home/oracle/u01/oracle/product/9.0.1/lib");
$conn=OCIlogon ($usrname, $pass, "");
$Oerror=OCIError($conn);
$column_name[64];
if ($Oerror==false){
        $stmt = ociparse($conn,$sqlstring);
        ociexecute($stmt,OCI_DEFAULT);
        $Oerror=OCIError($conn);
        if ($Oerror==false){
                $ncols = OCINumCols($stmt);
                if ((int)$ncols==0){
                        OCIError($stmt);
                        OCIFreeStatement($stmt);
                        OCICommit($conn);
                        OCIlogoff($conn);
                        echo("Done.");
                        return;
                }
                echo("<table border='0'><tr>");
                for ( $i = 1; $i <= $ncols; $i++ ) {
                $column_name[$i]  = 
OCIColumnName($stmt,$i);
                echo("<td>$column_name[$i]</td>");}
                echo("</tr>");
                while (ocifetch($stmt)){
                for ( $i = 1; $i <= $ncols; $i++ ) {
                           
echo("<td>".ociresult($stmt,$column_name[$i])."</td>");}
                echo("</tr>");
                }
                echo("</table>");
        }
        OCIError($stmt);
        OCIFreeStatement($stmt);
        OCICommit($conn);
        OCIlogoff($conn);
}



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=14024&edit=1

Reply via email to