Bug #13030: Periodic inability to connect to database, ORA-24327

From: Date: Wed, 29 Aug 2001 13:44:35 +0000
Subject: Bug #13030: Periodic inability to connect to database, ORA-24327
Groups: php.dev 
Request: Send a blank email to php-dev+get-64605@lists.php.net to get a copy of this message
From:             james.mcininch@cereon.com
Operating system: Solaris 7
PHP version:      4.0.6
PHP Bug Type:     OCI8 related
Bug description:  Periodic inability to connect to database, ORA-24327

Scripts that access oracle frequently fail to connect,
generating the error "OCISessionBegin: ORA-24327: need 
explicit attach before authenticating a user" when 
attempting OCIPLogon or OCINLogon. Accordin to the Oracle 
documentation, this message indicates that PHP attempted 
to open a connection on an invalid database handle.

Script:

<!-- keep reloading the page, it eventually dies -->
<?php
   $connection = OCIPLogon("user", "password", "database");
   if ($connection)
   {
      $sth = OCIParse($connection, "select table_name from 
all_tables");
      OCIExecute($sth);
      while (OCIFetchInto($sth, $result))
         echo "$result[0]<br>\n";
   }
?>

Modules:

'./configure' '--prefix=/usr/local' 
'--with-apxs=/usr/local/apache/bin/apxs' 
'--with-config-file-path=/usr/local/apache/conf' 
'--disable-xml' '--enable-bcmath' '--enable-calendar' 
'--enable-ftp' '--enable-shared' '--enable-sigchild' 
'--enable-sysvshm' '--enable-sysvsem' '--enable-shmop' 
'--enable-trans-sid' '--enable-yp' '--disable-xslt' 
'--enable-discard-path' '--enable-gd-native-ttf' 
'--enable-ucd-snmp-hack' '--enable-magic-quotes' 
'--with-bz2=/home/jjmcin' 
'--with-db3=/home/jjmcin/tmp/php' 
'--with-dom=/home/jjmcin/tmp/php' 
'--with-gd=/home/jjmcin/tmp/php' 
'--with-png-dir=/home/jjmcin/tmp/php' 
'--with-jpeg-dir=/home/jjmcin/tmp/php' 
'--with-t1lib=/home/jjmcin/tmp/php' 
'--with-tiff-dir=/home/jjmcin/tmp/php' 
'--with-ttf=/home/jjmcin/tmp/php' 
'--with-freetype-dir=/home/jjmcin/tmp/php' 
'--with-xpm-dir=/home/jjmcin/tmp/php' 
'--with-iconv=/home/jjmcin/tmp/php' 
'--with-ldap=/home/jjmcin/tmp/php' 
'--with-mysql=/home/jjmcin' '--with-oci8' 
'--with-openssl=/home/jjmcin/tmp/php' 
'--with-pgsql=/home/jjmcin/tmp/php' 
'--with-snmp=/home/jjmcin/tmp/php/snmp' 
'--with-zlib-dir=/home/jjmcin/tmp/php' 
'--with-zlib=/home/jjmcin/tmp/php' 
'--with-sablot=/home/jjmcin/tmp/php' 
'--with-xslt-sablot=/home/jjmcin/tmp/php' 
'--with-expat-dir=/home/jjmcin/tmp/php' 
'--with-pdflib=/home/jjmcin/tmp/php' 
'--with-mcrypt=/home/jjmcin/tmp/php' 
'--with-mhash=/home/jjmcin/tmp/php' 
'--with-curl=/home/jjmcin/tmp/php' 
'--with-java=/opt/share/java1.2/jdk1.2.2'

All extensions are statically linked except Oracle.

Oracle version is 8.1.6, load on the oracle server is
fairly low and server is setup with default settings for
Solaris. Apache version is 1.3.14 running as user "nobody"
There is no observed connectivity problems using sqlplus
or other oracle utilities.

Environment variables are set properly. and queries work 
properly at least 40% of the time (just click the reload 
button in the browser).



-- 
Edit bug report at: http://bugs.php.net/?id=13030&edit=1



Thread (1 message)

  • james dot mcininch at cereon dot com
« previous php.dev (#64605) next »