ID:               40542
 Updated by:       [EMAIL PROTECTED]
 Reported By:      marvin at chag dot net
-Status:           Open
+Status:           Bogus
 Bug Type:         OCI8 related
 Operating System: Linux
 PHP Version:      5.2.1
 New Comment:

Not PHP problem.
I'd also recommend upgrading the DB, 8i is not supported by Oracle for
a long time.


Previous Comments:
------------------------------------------------------------------------

[2007-02-19 13:06:43] marvin at chag dot net

Description:
------------
Problem is, that more or less often (not always) the call to OCIPLogon
(or OCILogon) results into an Oracle error message "ORA-02248: invalid
option for ALTER SESSION" and the connection to the database is not
made.

Everything worked fine up to PHP 5.1.1 but all other versions starting
from 5.1.2 up to 5.2.1 are showing this "ALTER SESSION" behavior.

The Oracle related environment for Apache startup is:

export ORACLE_SID=db
export ORACLE_TERM=vt220
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/8.1.7
export CLASSPATH=$ORACLE_HOME/jdbc/lib/classes111.zip
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$PATH:$ORACLE_HOME/bin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export NLS_LANG=GERMAN_GERMANY.WE8ISO8859P1


Webserver: 
Linux 2.4.21-303-smp4G
Apache 1.3.37 + SSL Patch 1.57
PHP 5.2.1 compiled statically into Apache
Oracle Client 8.1.7.0.0

Database:
Oracle from version 8.1.6 to 8.1.7.0.4 running on different Linux and
Windows

PHP configure line:
./configure  --with-ldap --enable-dbase --with-mysql --with-oci8
--with-oracle --with-gd --with-jpeg-dir --with-png-dir --with-tiff-dir
--with-xpm-dir --enable-calendar --enable-sigchild --with-zlib
--with-bz2 --enable-ftp --enable-sockets --with-apache=../apache_1.3.37
--with-gettext --enable-bcmath --with-mcrypt --with-mhash
--with-ttf=/usr/include/freetype --with-gmp --enable-trans-sid
--with-freetype-dir=/usr/include/freetype2 --enable-gd-native-ttf
--with-libxml-dir --enable-soap


Reproduce code:
---------------
<?
OCIInternalDebug(1);

for ($i = 1; $i <= 10; $i++)
{
        $con = @OCIPLogon("<user>","<pass>","<db>");
        if ($con == true)
                break;
        else
        {
                echo var_dump(OCIError());
                break;
        }
};
?>

Expected result:
----------------
OCIPLogon() should give a valid DB connection.

Actual result:
--------------
When the connect is not working, DEBUG shows the following:

OCI8 DEBUG: OCIEnvCreate at (/php-5.2.1/ext/oci8/oci8.c:1216)
OCI8 DEBUG: OCIHandleAlloc at (/php-5.2.1/ext/oci8/oci8.c:1239)
OCI8 DEBUG: OCIServerAttach at (/php-5.2.1/ext/oci8/oci8.c:1248)
OCI8 DEBUG: OCIHandleAlloc at (/php-5.2.1/ext/oci8/oci8.c:1258)
OCI8 DEBUG: OCIHandleAlloc at (/php-5.2.1/ext/oci8/oci8.c:1267)
OCI8 DEBUG: OCIHandleAlloc at (/php-5.2.1/ext/oci8/oci8.c:1276)
OCI8 DEBUG: OCIAttrSet at (/php-5.2.1/ext/oci8/oci8.c:1286)
OCI8 DEBUG: OCIAttrSet at (/php-5.2.1/ext/oci8/oci8.c:1297)
OCI8 DEBUG: OCIAttrSet at (/php-5.2.1/ext/oci8/oci8.c:1307)
OCI8 DEBUG: OCIAttrSet at (/php-5.2.1/ext/oci8/oci8.c:1316)
OCI8 DEBUG: OCISessionBegin at (/php-5.2.1/ext/oci8/oci8.c:1350)
OCI8 DEBUG: OCIErrorGet at (/php-5.2.1/ext/oci8/oci8.c:922)
OCI8 DEBUG: OCIHandleFree at (/php-5.2.1/ext/oci8/oci8.c:1514)
OCI8 DEBUG: OCIServerDetach at (/php-5.2.1/ext/oci8/oci8.c:1518)
OCI8 DEBUG: OCIHandleFree at (/php-5.2.1/ext/oci8/oci8.c:1522)
OCI8 DEBUG: OCIHandleFree at (/php-5.2.1/ext/oci8/oci8.c:1526)
OCI8 DEBUG: OCIHandleFree at (/php-5.2.1/ext/oci8/oci8.c:1530)
OCI8 DEBUG: OCIHandleFree at (/php-5.2.1/ext/oci8/oci8.c:1534)

DEBUG XXX
OCI8 DEBUG: OCIErrorGet at (/php-5.2.1/ext/oci8/oci8.c:922) array(4) {
["code"]=> int(604) ["message"]=> string(94) "ORA-00604: error occurred
at recursive SQL level 1 ORA-02248: invalid option for ALTER SESSION"
["offset"]=> int(0) ["sqltext"]=> string(0) "" }


------------------------------------------------------------------------


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

Reply via email to