Jump to content

oracle


bluetoother

Recommended Posts

can i connect my php scripts to oracle DB on remote server when iam using a hosting serveras same as connecting your web site to mysql databse,i mean : when i connect the web site to mysql DB i need to know the ip address of the DB server and DB name,, is it the same for oracle and php ?

Link to comment
Share on other sites

  • 2 years later...

Looking at that link, is this all you really need to connect to a remote db server?

<?php$username = "some username";$password = "some pw";$db = "(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = something.something.com)(PORT = 9999))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = something.something.com)))";$conn = oci_connect($username, $password, $db);if (!$conn) {	echo 'you fail';} else {	echo "success!";}?>

I get a fatal error saying:

Fatal error: Call to undefined function oci_connect() in C:\xampp\htdocs\OOP_PHP\Oracle_call.php on line 7

Also, what is contained in my $db variable? Someone gave me this information but I dont know what it means, since Im not very familiar with Oracle.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...