Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
PHP oracle oci configuration test code.
$user = 'username';
$passwd = 'password';
// oracle ip or domain
$srv = '';
$sid = 'SID';
$port = 1521;
$conn = oci_connect($user, $passwd, "${srv}:${port}/${sid}", 'AL32UTF8');
if (!$conn) {
$e = oci_error();
die($e['message'] . "\n");
$stid = oci_parse($conn, 'SELECT sysdate FROM dual');
if (!oci_execute($stid)) {
$e = oci_error($stid);
die($e['message'] . "\n");
while ($row = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS)) {
var_dump($row) . "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.