I got these error message in my browser :
Warning: _oci_open_server: Error while trying to retrieve text for error ORA-12154 in /var/www/html/useoracle4.php on line 4
Warning: Supplied argument is not a valid OCI8-Connection resource in /var/www/html/useoracle4.php on line 5
Warning: Supplied argument is not a valid OCI8-Statement resource in /var/www/html/useoracle4.php on line 6
Warning: Supplied argument is not a valid OCI8-Statement resource in /var/www/html/useoracle4.php on line 7
Warning: Supplied argument is not a valid OCI8-Statement resource in /var/www/html/useoracle4.php on line 17
when I run this scripts :
<?php
print "<HTML><PRE>\n";
$db = "mydb";
$conn = OCILogon("user","pass",$db);
$stmt = OCIParse($conn,"select * from mytable");
OCIExecute($stmt);
while ( OCIFetch($stmt) ) {
print "\n";
$ncols = OCINumCols($stmt);
for ( $i = 1; $i <= $ncols; $i++ ) {
$column_name = OCIColumnName($stmt,$i);
$column_value = OCIResult($stmt,$i);
print $column_name." : ".$column_value. "\n";
}
print "\n";
}
OCIFreeStatement($stmt);
OCILogoff($conn);
print "</PRE>";
print "</HTML>\n";
?>
Any idea, why this happen ?
Thank you.
Gilijk