Bug #14024 Updated: can't do select on char, varchar2 etc. variables with oracle 9i
| From: | thies@php.net | Date: | Sat, 13 Apr 2002 12:58:54 +0000 |
| Subject: | Bug #14024 Updated: can't do select on char, varchar2 etc. variables with oracle 9i | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-4868@lists.php.net to get a copy of this message | ||
ID: 14024
Updated by: thies@php.net
Reported By: Andrew.Karadimov@bulpost.com
-Status: Open
+Status: Closed
Bug Type: OCI8 related
Operating System: linux;kernel-2.4.x
PHP Version: 4.0.6
New Comment:
set the oracle env vars _before_ you start apache. PutEnv will not
work.
Previous Comments:
------------------------------------------------------------------------
[2001-11-12 02:30:03] Andrew.Karadimov@bulpost.com
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