title: PHP oci_connect() TNS:could not resolve the connect identifier (ORA-12154)
body: <p>I'm testing some PHP code on Ubuntu server and oracle database connection is checked by the "tnsping" command</p>
  
  <pre class="lang-none prettyprint-override"><code>Used TNSNAMES adapter to resolve the alias
  Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.3.14)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = ORCL) (SID = ORCL)))
  OK (10 msec)
  </code></pre>
  
  <p>But, oci_connect function in PHP shows an warning like as</p>
  
  <blockquote>
    <p>Warning: oci_connect(): ORA-12154: TNS:could not resolve the connect identifier specified in /usr/local/ipm5/wui/manager/123.bih on line 6 2</p>
  </blockquote>
  
  <p>of course, the OCI8 is enabled(checked via phpinfo) and some environment(<code>PATH</code>,<code>ORACLE_BASE</code>,<code>ORACLE_HOME</code>,<code>ORACLE_SID</code>,<code>TNS_ADMIN</code>,<code>LD_LIBRARY_PATH</code> ) variables are set into <code>/etc/bash.bashrc</code></p>
  
  <p>do anyone recommend?? what the problem is.</p>