Bug #14024: can't do select on char, varchar2 etc. variables with oracle 9i
| From: | Andrew dot Karadimov at bulpost dot com | Date: | Mon, 12 Nov 2001 07:30:04 +0000 |
| Subject: | Bug #14024: can't do select on char, varchar2 etc. variables with oracle 9i | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-70204@lists.php.net to get a copy of this message | ||
From: Andrew.Karadimov@bulpost.com
Operating system: linux;kernel-2.4.x
PHP version: 4.0.6
PHP Bug Type: OCI8 related
Bug description: can't do select on char, varchar2 etc. variables with oracle 9i
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 bug report at: http://bugs.php.net/?id=14024&edit=1