Enable PDO OCI8 for PHP

software development

#1

Hi Everyone,
(Forgive me if this is common knowledge or answered… I searched, I promise)
I’m looking to enable PDO OCI8 for php.
On other platforms (not shared hosting) I have previously implemented by: - installing “./configure --with-oci8…” and oracle instant client

  • editing the php.ini file to uncomment or add the "enable’ lines

Is there a way to do a similar thing for dreamhost hosting?

I am looking to use a connection like the following:
try {
$tns = “
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxx.xxx.xxx.xxx)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORCL)
)
)
”;
$pdo_string = ‘oci:dbname=’.$tns;

	$oraconn = new PDO($pdo_string, "username", "password");
	$oraconn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

}
	catch (PDOException $e) {
		echo "ORACLE ERROR: " . $e->getMessage();
}

Any help would be greatly appreciated!!