PHP and oracle

we are not able to connect oracle client on linux. using either odbc_connect,ora_logon or ocilogon.
$cnx = Ora_Logon('','portal');

It gives the TNS : could not resolve service name.
Who is Participating?
us111Connect With a Mentor Commented:
Do you have your DNS configured?
Hi balasudaram,

Please check:
1.- You had set the LD_LIBRARY_PATH in your php scripts
2.- TNSNAMES.ORA is accessible to Apache (apache user is 'nobody' by default)
3.- Test if your Oracle server is visible from your webserver machine:"$ tnsping <database_name>"


$cnx = Ora_Logon('','portal');

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.