something like this is pretty basic to test the log in.
you need to set the proper username, password, hostname, and oracle servicename of the DB server
$oracle["user"] = "username";
$oracle["pass"] = "password";
$oracle["sid"] = "(DESCRIPTION = ( ADDRESS_LIST = ( ADDRESS = (PROTOCOL = TCP)(HOST = hostname.domain.com)(PORT = 1521) ) ) ( CONNECT_DATA = (SERVICE_NAME = servicename) ) )";
$dbh = @OCILogon($oracle["user"], $oracle["pass"], $oracle["sid"]);
if($error = OCIError()) {
echo "Error: " . $error;
} else {
echo "Success";
}
// if you can run the above successfully, try adding this
// parse a sql statement
$stmt = @OCIParse($dbh, "SELECT 1 FROM DUAL");
// execute sql statement
@OCIExecute($stmt);
// put results into an array
while ( OCIFetchInto ($stmt, $row, OCI_ASSOC) ) {
$results[] = $row;
}
print_r($results);