Oracle + PHP + Linux Red Hat {again}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please, any idea to resolve my problem!!!

I have the output:
Connected to DataBase Oracle!
Warning: OCIStmtExecute: ORA-03106: fatal two-task communication protocol 
error in /var/www/html/ora2.php on line 21

Warning: OCIFetchStatement: ORA-24374: define not done before fetch or 
execute and fetch in /var/www/html/ora2.php on line 22
Found: 0 results

I'm running redhat 7.3 with oracle 9i client connecting to oracle 8.0.5 
Server on NT. I put the putEnv to $ORACLE_HOME,$ORACLE_SID,I use 
OCIDefineByName, but the result is the error. When I'm using the oci 
functions I can't receive the error above, but if I use the old oracle 
functions of php, the results are good.

Do someone have any idea to resolve my problem??

Thanks in advance.

P.D. I probe to set up the User=oracle and Group dba in apache web server, 
but  either, it's not working.

The source code:
<?php
PutEnv("ORACLE_SID=upbback");
PutEnv("ORACLE_HOME=/opt/oracle/product/9.2.0");

$db_conn = ocilogon("generador","sinok","upbback");
if (!$db_conn)
{
   echo "Connection failed";
   echo "Error Message: [" . OCIError($db_conn) . "]";
   exit;
}
else
{
  echo "Connected to DataBase Oracle!";
}

$cmdstr = "select cod_aula,nombre from aulas";
$parsed = ociparse($db_conn, $cmdstr);
OCIDefineByName($parsed,"COD_AULA",&$codaula);
OCIDefineByName($parsed,"NOMBRE",&$nombre); 
OCIExecute($parsed);
$nrows = ocifetchstatement($parsed, $results);
echo "Found: $nrows results\n";
echo "<table border=1 cellspacing='0' width='50%' align=center>\n";
echo "<tr>\n";
echo "<td><b>Codigo</b></td>\n";
echo "<td><b>Nombre</b></td>\n";
echo "</tr>\n";

for ($i = 0; $i < $nrows; $i++ ) {
echo "<tr>\n";
echo "<td>" . $codaula. "</td>";
echo "<td>" . $nombre. "</td>";
echo "</tr>\n";
}
echo "</table>\n";
OCIFreeStatement($parsed);
OCILogoff($db_conn);
?>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux