PHP and oracle

Posted on 2000-04-27
Last Modified: 2008-03-17
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.
Question by:balasundaram
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

us111 earned 100 total points
ID: 2758407
Do you have your DNS configured?

Expert Comment

ID: 2789363
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');


Featured Post

Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question