R: [PHP-DB] Problem ORA-03106: fatal two-task communication prot ocol error with varchar2 column
| From: | Roberto Sartor | Date: | Tue, 05 Dec 2000 16:42:44 +0000 |
| Subject: | R: [PHP-DB] Problem ORA-03106: fatal two-task communication prot ocol error with varchar2 column | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-5022@lists.php.net to get a copy of this message | ||
First:I suggest making SQL statement all in uppercase, against Oracle:so
manual says.
Second: You miss OCIDefineByName, after OCIParse.
This script from a famous manual:
Esempio 1. OCIDefineByName
<?php
/* OCIDefineByPos example thies@thieso.net (980219) */
$conn = OCILogon("scott","tiger");
$stmt = OCIParse($conn,"select empno, ename from emp");
/* the define MUST be done BEFORE ociexecute! */
OCIDefineByName($stmt,"EMPNO",&$empno);
OCIDefineByName($stmt,"ENAME",&$ename);
OCIExecute($stmt);
while (OCIFetch($stmt)) {
echo "empno:".$empno."\n";
echo "ename:".$ename."\n";
}
OCIFreeStatement($stmt);
OCILogoff($conn);
?>
Ciao
Roberto
> -----Messaggio originale-----
> Da: Tim Parkin [mailto:Tim.Parkin@didio.com]
> Inviato: martedì 5 dicembre 2000 17.22
> A: 'halim'; php-db@lists.php.net
> Oggetto: RE: [PHP-DB] Problem ORA-03106: fatal two-task communication
> prot ocol error with varchar2 column
>
>
> never had this problem ... I don't use empno or ename though, I use
> media_title and media_publisher
>
> -----Original Message-----
> From: halim [mailto:halim@inf.its-sby.edu]
> Sent: Tuesday, December 05, 2000 08:49
> To: php-db@lists.php.net
> Subject: [PHP-DB] Problem ORA-03106: fatal two-task communication
> protocol error with varchar2 column
>
>
> This page works if I omitted ename from select statement.
> Does anybody have the similar problem ?
> I running RedHat 7.0 Mandrake with Oracle 8.1.5 Client
> connecting to Oracle
> 8.1.6 Server on NT, Apache 1.3.12, Php 4.0.3pl.
>
> <?
> print "<HTML><TITLE>". time() ."</TITLE>";
> $conn = OCILogon("scott","tiger","rpl.world") or die("Could
> not make
> connection");
> $statement = OCIParse($conn,"select empno,ename from emp");
> OCIExecute($statement,OCI_DEFAULT);
> echo "<TABLE Border=1>";
> while (OCIFetch($statement)) {
> echo "<TR>";
> echo "<TD>" . OCIResult($statement,"EMPNO") .
> "</TD>";
> echo "<TD>" . OCIResult($statement,"ENAME") .
> "</TD>";
> echo "</TR>";
> }
> print "</TABLE></HTML>";
> OCIFreeStatement($statement);
> OCILogoff($conn); ?>
>
> Any help would be apreciate.
>
>
>