ora_logon receive ora-12154

wxdqz

New Member
Hi,

I'am having serious problems in put php acessing a remote oracle 8 database, i have tried several configurations but always end up with

Oracle: Connection Failed: ORA-12154: TNS:could not resolve service name in /var/www/htdocs/support/teste.php on line 5

I can access this database from sqlplus and when I start apache all oracle variables are set. If I get rid of the connect string and access my local database then everything is ok.

My code is something like...

putenv("ORACLE_HOME=/apps/oracle/8.1.7");
putenv("TNS_ADMIN=/apps/oracle/8.1.7/network/admin");

// main
if(!($conn=ora_logon("user@SERVICE","pass"))) {
echo "Error: Cannot connect to database\n";
exit;
}

....

Using:

apache: apache_1.3.19
php4: php-4.0.5
Linux: Red Hat 7.0 with latest patch's
Remote Oracle DB: Oracle 8.1.6 W2K
Local DB: Oracle 8.1.7 Linux

php build with: --with-oci8 --with-oracle

Any help would be apreciated...

Thanks,
Miguel
 
Back
Top