Home » Open Source » Programming Interfaces » PHP-OCI interface (PHP 5.4 OCI 11gR1 32 bit)
PHP-OCI interface [message #632694] Wed, 04 February 2015 09:33 Go to next message
aliyesami
Messages: 28
Registered: October 2005
Location: Florida
Junior Member
I am reading everywhere that one of the ways to connect using OCI is as follows:

$conn = oci_connect('hr', 'welcome', 'localhost/XE');


but this is not working for me , if I use the tnsnames alias instead of hostname/servicename it works.

thanks
Re: PHP-OCI interface [message #632695 is a reply to message #632694] Wed, 04 February 2015 09:47 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
aliyesami wrote on Wed, 04 February 2015 07:33
I am reading everywhere that one of the ways to connect using OCI is as follows:

$conn = oci_connect('hr', 'welcome', 'localhost/XE');


but this is not working for me , if I use the tnsnames alias instead of hostname/servicename it works.

thanks


see a picture of my car.
It is not working for me.
Tell me how to make my car go.

No where in any documentation can I find any Oracle error code or message like "not working for me".
Above 100% devoid of any meaningful detail that could be used to provide any possible useful solution.

Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/ and read http://www.orafaq.com/forum/t/174502/
Re: PHP-OCI interface [message #632696 is a reply to message #632694] Wed, 04 February 2015 09:49 Go to previous messageGo to next message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

"localhost" is not a valid address; I bet you have not "localhost" in your tnsnames.ora; use the same values.

By the way, to be able to use the easy connect syntax, NAMES.DIRECTORY_PATH line of your sqlnet.ora file must contain the EZCONNECT value.
For instance:
NAMES.DIRECTORY_PATH=(EZCONNECT,TNSNAMES)

Re: PHP-OCI interface [message #632982 is a reply to message #632696] Mon, 09 February 2015 09:00 Go to previous message
Michel Cadot
Messages: 68624
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Any feedback?

Previous Topic: java script format mask problem
Next Topic: Lob read/write functions called while another read/write is in progress: getBytes()
Goto Forum:
  


Current Time: Thu Mar 28 05:55:13 CDT 2024