cant connect with OCI8 using php5.2.5 [message #317511] |
Thu, 01 May 2008 14:31 |
aliyesami
Messages: 28 Registered: October 2005 Location: Florida
|
Junior Member |
|
|
I can see the oci8 module is loaded but when I try to connect I get the error "
Warning: oci_connect() [function.oci-connect]: ORA-12154: TNS:could not resolve the connect identifier specified in /usr/local/apache/htdocs/testoci.php on line 6
"
NOTE: from oracle account I can connect to "emrep" using sqlplus so i know the tns entry is good.
|
|
|
|
Re: cant connect with OCI8 using php5.2.5 [message #317519 is a reply to message #317511] |
Thu, 01 May 2008 15:29 |
aliyesami
Messages: 28 Registered: October 2005 Location: Florida
|
Junior Member |
|
|
well I connect to the same database using php installed on my laptop (xampp release) connecting to the same tns entry .
the php code and connect string is shown below, which works fine on the pc with xampp version and is failing on the solaris 9 box with tns entry not found error.
<?php
$conn = oci_connect('SAMI', 'SAMI', 'emrep');
<?
$ sqlplus sami/sami@emrep
SQL*Plus: Release 10.2.0.3.0 - Production on Thu May 1 16:26:30 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL>
it never worked on solaris9, with oci8 support.
can you give me a working ./configuration commands for compiling apache and php with oci8 ?
i am reading online that the error i am experiencing can also be caused if php is not compiled in CGI mode .
|
|
|
|
Re: cant connect with OCI8 using php5.2.5 [message #317521 is a reply to message #317520] |
Thu, 01 May 2008 16:02 |
aliyesami
Messages: 28 Registered: October 2005 Location: Florida
|
Junior Member |
|
|
sorry if I my posting was out of guidline , here is all the information you asked :
- php5.2.5, Apache2.2.8, oracle basic client 10.2.0.3, RDBMS oracle 10.2.0.3 , all running on one box solaris 9.
- sqlplus launced from the box also ..it has the tns entry. also from my laptop sqlplus works as the same tns entry is in my laptop .
> is failing on the solaris 9 box with tns entry not found error.
This needs to be fixed.
what do you mean by this i dont get it
|
|
|
|
|