Re: PHP4 / WinNT 4 / Oracle 7.3 via ODBC
| From: | R Maier | Date: | Mon, 22 Jan 2001 08:33:07 +0000 |
| Subject: | Re: PHP4 / WinNT 4 / Oracle 7.3 via ODBC | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-6025@lists.php.net to get a copy of this message | ||
hi Carlos,
looks like ORACLE_HOME and/or LD_LIBRARY_PATH are not set correct during
execution.
1. afer setting the variables with putenv check if they are really set with
phpinfo(INFO_ENVIRONMENT);
2. if they are still not set correct (what might be the problem, export them in
your apache startscript.
Rainer
Carlos Correa Goncalves schrieb:
> Hi,
>
> I´m using PHP 4.0.4pl1 with extension php_oracle.dll, Oracle client 7.3 with
> the following products installed:
> -------------------------
> Call Interface 7.3.4.0.0
> Objects for OLE 2.2.1.0.0
> 32 bit ODBC 2.5.3.1.0B
> Support files 7.3.4.0.0
> SQL*Net Client 2.3.4.0.0
> ... and others
> ------------------------------
>
> I´m trying to connect to an Oracle 7.3 database with ODBC functions or
> direct connection. Those are the code:
>
> ---------------
> putenv("ORACLE_SID=badm");
> putenv("ORACLE_HOME=C:\ORANT");
> putenv("TNS_ADMIN=C:\ORANT\NETWORK\ADMIN");
>
> $connect = ora_logon("usercons@badm","sylkds");
> ----------------
> putenv("ORACLE_SID=badm");
> putenv("ORACLE_HOME=C:\ORANT");
> putenv("TNS_ADMIN=C:\ORANT\NETWORK\ADMIN");
>
> $connect = odbc_connect("badm" ,"consulta","consulta");
> ---------------
>
> Both are returning the following message from PHP:
> Warning: Oracle: Connection Failed: ORA-12154: TNS:could not resolve service
> name in oracle.php on line xxx
> Any suggestion?
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net