PHP 4.0 Bug #9230: PHP cannot connect to remote Oracle databases
| From: | mfarver at texas dot net | Date: | Mon, 12 Feb 2001 18:03:24 +0000 |
| Subject: | PHP 4.0 Bug #9230: PHP cannot connect to remote Oracle databases | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-46435@lists.php.net to get a copy of this message | ||
From: mfarver@texas.net
Operating system: Win95/NT
PHP version: 4.0.4pl1
PHP Bug Type: Oracle related
Bug description: PHP cannot connect to remote Oracle databases
$handle = ora_plogon('scott@remotedb','tiger');
Always returns "ORA-12154: TNS:could not resolve service name" or similar errors
indicating Oracle is not reading the TNSNAMES.ORA file. Using sysinternals filemon to watch PHP
accessing files shows the same result, the oracle drivers never read tnsnames.ora when called from
php. SQLNET.log files indicate that PHP is always attempting to use the BEQLOCAL protocol adapter
regardless of the tnsnames.ora settings. Adding a ORACLE_SID environment variable caused php to try
to connect to that SID at BEQLOCAL.
Users report that Oracle's SQLPLUS and external ODBC programs have no trouble accessing the
remote db. tnsping and other oracle test programs work correctly when called from a php passthru
function, indicating that the environment is correct.
This problem occurs using both OCI and ORACLE functions.
About a half dozen individuals on the php-db list have noted the same problem. To date no one on
the PHP-DB list has claimed to make php work with oracle under windows. All the users report using
php with an oracle 8.x.x client and the precompiled binaries supplied from the main php site. Many
variations of ORACLE_HOME and other env variable settings have been tried.
Under Unix php does not exhibit the same problem..
--
Edit Bug report at: http://bugs.php.net/?id=9230&edit=1