PHP ORACLE 11g Connection string

<?php
$user_name=”kuet”;
$paswd=”kuet”;
$conn = oci_connect($user_name, $paswd,
‘(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.165)(PORT=1521))
(CONNECT_DATA=(SERVER=DEDICATED)
(SERVICE_NAME = dbkuet.localdomain)))’);
if (!$conn) {
    $e = oci_error();
    trigger_error(htmlentities($e[‘message’], ENT_QUOTES), E_USER_ERROR);
}
else
{
print “PHP is connected with Oracle 11g database”;
}
?>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s