i am trying to connect Oracle and PHP, i followed PHP manual for connecting and connected success fully by this below way:
oci_connect('Username','Password', ' (DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = mymachine.oracle.com)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = XE)))' );
But Whenever i am using below method
oci_connect('Username','Password', ,'MYDB');
i'm getting this error:
Warning: oci_connect(): ORA-12154: TNS:could not resolve the connect identifier specified in
So, i have checked all the way some one said use Oracle client files i added tnsnames.ora,ORACLE_HOME,TNS_ADMIN and everything done, from the reference of previous questions but still the problem haven't resolved.
am i doing anything wrong, if please help me to get out from this problem.
Thanks in advance.