I am new to PHP and am trying to connect to a oracle database on some server.
However the php script is not executing properly.
<?php
echo "started
";
// Create connection to Oracle
$conn = oci_connect("username", "password", "abc.def.ghi.com");
if (!$conn) {
$m = oci_error();
echo $m['message'], "
";
exit;
}
else {
print "Connected to Oracle!";
}
// Close the Oracle connection
oci_close($conn);
?>
It prints started, but after that it does not print any error or "Connected to Oracle".
php -l filename.php gives "no syntax errors".
Was PHP compiled with oracle support? Check your error log, if not you'll error out on oci_connect() and not reach anything else.
(display errors would also be of help)