#19129 [Opn->Fbk]: Oracle 'ORA-12541: TNS:no listener' causes OCI8 to break
| From: | thies@php.net | Date: | Fri, 13 Sep 2002 16:59:11 +0000 |
| Subject: | #19129 [Opn->Fbk]: Oracle 'ORA-12541: TNS:no listener' causes OCI8 to break | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-19316@lists.php.net to get a copy of this message | ||
ID: 19129
Updated by: thies@php.net
Reported By: dante.lorenso@atmosenergy.com
-Status: Open
+Status: Feedback
Bug Type: OCI8 related
Operating System: RedHat Linux 7.3
PHP Version: 4.2.1
New Comment:
plz send me a minimal _SELF_CONTAINED_ (= complete) script
that i can run on my dev-box.
Previous Comments:
------------------------------------------------------------------------
[2002-09-12 09:20:11] dante.lorenso@atmosenergy.com
I can't let you inside the firewall to see the problem first-hand, but
I'll run any tests you want. Here is some phpinfo() for you:
----------
System
----------
Linux dfw1wu19 2.4.18-5 #1 Mon Jun 10 15:31:48 EDT 2002 i686 unknown
----------
Build Date
----------
Jul 10 2002 11:11:19
----------
Configure Command
----------
'./configure' '--with-oracle=/opt/app/oracle/product/8.1.5'
'--with-oci8=/opt/app/oracle/product/8.1.5' '--enable-sigchild'
'--with-ldap' '--with-gd'
'--with-config-file-path=/www/apache/conf/php'
'--with-apache=../apache_1.3.26/' '--enable-track-vars'
'--enable-bcmath' '--enable-ftp'
----------
Server API
----------
Apache
----------
Virtual Directory Support
----------
disabled
----------
Configuration File (php.ini) Path
----------
/www/apache-1.3.26_ssl/conf/php/php.ini
----------
Debug Build
----------
no
----------
Thread Safety
----------
disabled
------------------------------------------------------------------------
[2002-09-12 04:58:12] thies@php.net
seems to work for me (oracle 9.2.0.1)
any chance i could get a login on your box to see the
problem?
------------------------------------------------------------------------
[2002-09-12 04:58:12] thies@php.net
seems to work for me (oracle 9.2.0.1)
any chance i could get a login on your box to see the
problem?
------------------------------------------------------------------------
[2002-08-27 15:05:08] dante.lorenso@atmosenergy.com
I use the following code to loop through an array of SIDs for
Oracle...and attempt to change the password for a given username on
each Oracle database...
==================================================
foreach ($names as $SID => $CONN_SID) {
// make a connection
$dbconn = @OCINLogon($username, $old_password, $SID);
if (! $dbconn) {
$this->dumpError("ORAPASS[OCILogon]");
continue;
}
// parse the SQL statement...
$sql_statement = @OCIParse($dbconn, $sql);
if (! $sql_statement) {
error_log("ORAPASS[OCIParse]");
@OCILogOff($dbconn);
continue;
}
// execute sql query
$exec_result = @OCIExecute($sql_statement);
if (! $exec_result) {
error_log("ORAPASS[OCIExecute]");
@OCILogOff($dbconn);
continue;
}
// disconnect...
@OCILogOff($dbconn);
unset($dbconn);
// show the results...
$text .= sprintf ('Success: %s<br>', $SID);
}
==================================================
However, for some reason if the SID I connect to results in the
following OCIError:
Failed: SID1 (ORA-12541: TNS:no listener)
Then, all subsequent OCINLogon or OCILogon calls will result in this
error message:
Failed: SID2 (ORA-12154: TNS:could not resolve service name)
If I restart Apache/PHP and connect to SID2, it will work, but if I
connect to any SID after getting the 'ORA-12541: TNS:no listener'
error, my Oracle connections all fail.
--Dante
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19129&edit=1