Jump to content

Connecting to Oracle 8 database.


iPixel

Recommended Posts

Ok something is wrong and i have ZERO clue what.

 

I am connecting to an oracle on a server other then the web server.

 

I've changed all i could in php.ini to allow oracle extensions and all that fun stuff.

 

I am even able to connect to the oracle database via command prompt using sqlplus.

 

Here is my connection via php script. I dont know why but the page does not open and the browser returns the error page "The website cannot display the page". Is there a programming issue i dont know. This is my first time connecting to oracle and outside of the server box.

 

<?php

echo "TEST";

PutEnv("ORACLE_SID=mydb");
PutEnv("TNS_ADMIN=C:/Program Files/Oracle Instant Client");

if ($c = oci_connect("username", "password", "DBCONN_MAN")) 
{
	echo "Successfully connected to Oracle.n";
} 
else 
{
	echo "Oracle Connect Error ";
}
?>

 

The only thing i think might be the issue is in my phpinfo(); i get this.

 

"--with-oci8=D:\php-sdk\oracle\instantclient10\sdk,shared"

 

and this weird D:\ path does not exist on my web php server but i do not see where i can change this inside the php.ini file and even if i could im not sure what i should be pointing to.

 

Thanks 2 All.

Link to comment
https://forums.phpfreaks.com/topic/158770-connecting-to-oracle-8-database/
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.