PHP & ODBC problem with ORACLE
| From: | Emmanuel Plovier | Date: | Mon, 13 Nov 2000 21:04:40 +0000 |
| Subject: | PHP & ODBC problem with ORACLE | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-4406@lists.php.net to get a copy of this message | ||
Hi there,
I am desperatly trying to run PHP scipt whith Oracle using ODBC.
I downloaded ODBC 8062 from Oracle, and configure it properly (i think). Indeed when using ODBCtst
there is no problem connecting to the database.
I then wrote this simple scipt in PHP to test the connection:
// create an ODBC connection, returned in $cnx
$cnx = odbc_connect( 'DB' , 'USER', 'PASS' );
if( ! $cnx ) {
Error_handler( "Error in odbc_connect" , $cnx );
}
and get persistently the error :
Warning: SQL error: [Oracle][ODBC][Ora]ORA-12154: ORA-12154: TNS:could not resolve
service name
I then put the TNS_ADMIN "C:\Program Files\Orant\Network\Admin" in the apache httpconf and
got exactly the same error. I found articles about this problem but does someone have the solution ?
Thanks in advance.
Emmanuel
_________________________________________s_p_r_a_y_
Internet commence ici!
Choisissez vous aussi le-mail et lInternet gratuits sur http://www.spray.fr