Thanks for the link, but I'm still having problems.
PHP is working fine, and I can Telnet to the school's server and run SQL*PLUS commands just fine, but the OCI logon commands are not recognized. Here is my test script:
<?php
putenv ("ORACLE_HOME /orardbms/rdbms/v9/9.2.0");
putenv ("ORACLE_SID STUDENT");
putenv ("TNS_ADMIN /orardbms/dba_home/oracle/msu_home/dba/sqlnet");
$db_conn = ocilogon("my_username", "my_pw");
$cmdstr = "select ename, sal from emp";
$parsed = ociparse($db_conn, $cmdstr);
ociexecute($parsed);
$nrows = ocifetchstatement($parsed, $results);
echo "Found: $nrows results<br><br>\n";
echo "<table border=1 cellspacing='0' width='50%'>\n";
echo "<tr>\n";
echo "<td><b>Name</b></td>\n";
echo "<td><b>Salary</b></td>\n";
echo "</tr>\n";
for ($i = 0; $i < $nrows; $i++ ) {
echo "<tr>\n";
echo "<td>" . $results["ENAME"][$i] . "</td>";
echo "<td>$ " . number_format($results["SAL"][$i], 2). "</td>";
echo "</tr>\n";
}
echo "</table>\n";
?>
This gives the error:
Fatal error: Call to undefined function: ocilogon() in /home/parisd0/f20215/public_html/test.php on line 10
Now, is there anything I can do without admin privileges? Is there a problem with the way Apache is configured or am I missing something?
Thanks!