Hello folks:
I have been trying for the last 2 days (thu/fri) to connect to a remote NT4+Oracle server using local NT4+PHP+Apache, I tryed all the tips in this forum, and some were useful, but always when I solve a problem another one shows up.
From Net8 Easy Config I can perfectly connect to data base. So server is ok, local client is ok, user and pass is ok.
Then I set the three variables before calling ora_connect:
putenv("ORACLE_SID=THE_SID");
putenv("ORACLE_HOME=D:\\orant\\");
putenv("TNS_ADMIN=D:\\orant\\net80\\admin\");
The TNS_ADMIN folder has a valid tnsnames.ora.
The connecting code is this one:
$conn = ora_logon("the_user@THE_SID", "the_pass");
echo "ERROR: " . ora_error();
It returns the following output:
ERROR: ORA-12154: TNS:could not resolve service name
Here are the details:
Client
. NTWks 4
. Apache 1.3.2
. PHP 4.0.6
. Oracle Client 8.0.5
Server
. NTWks 4
. Oracle Server 8.0.5
Both using TCP/IP with inet access
The final version will be hosted using LnxRH+Apache+PHP accessing the same database server.
Can anybody help me solving this? Is it better to change from ora_* functions to odbc_* functions? Is it better to change from Apache+PHP to Apache+JSP+JDBC or Tomcat+JSP+JDBC?
Thanks in Advance
Fabio A Mazzarino
I have been trying for the last 2 days (thu/fri) to connect to a remote NT4+Oracle server using local NT4+PHP+Apache, I tryed all the tips in this forum, and some were useful, but always when I solve a problem another one shows up.
From Net8 Easy Config I can perfectly connect to data base. So server is ok, local client is ok, user and pass is ok.
Then I set the three variables before calling ora_connect:
putenv("ORACLE_SID=THE_SID");
putenv("ORACLE_HOME=D:\\orant\\");
putenv("TNS_ADMIN=D:\\orant\\net80\\admin\");
The TNS_ADMIN folder has a valid tnsnames.ora.
The connecting code is this one:
$conn = ora_logon("the_user@THE_SID", "the_pass");
echo "ERROR: " . ora_error();
It returns the following output:
ERROR: ORA-12154: TNS:could not resolve service name
Here are the details:
Client
. NTWks 4
. Apache 1.3.2
. PHP 4.0.6
. Oracle Client 8.0.5
Server
. NTWks 4
. Oracle Server 8.0.5
Both using TCP/IP with inet access
The final version will be hosted using LnxRH+Apache+PHP accessing the same database server.
Can anybody help me solving this? Is it better to change from ora_* functions to odbc_* functions? Is it better to change from Apache+PHP to Apache+JSP+JDBC or Tomcat+JSP+JDBC?
Thanks in Advance
Fabio A Mazzarino