ID:               40542
 User updated by:  marvin at chag dot net
 Reported By:      marvin at chag dot net
-Status:           Feedback
+Status:           Open
 Bug Type:         OCI8 related
 Operating System: Linux
 PHP Version:      5.2.1
 New Comment:

Hi Tony2001, 
Thank you very much for the kind offer. Unfortunately our companies
security policies does not allow such an approach. But I will happily
investigate the problem according to your requirements and send you the
debugging information & results you need to isolate the problematic
lines.


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

[2007-02-20 10:03:38] [EMAIL PROTECTED]

>So I kindly ask, wether you please can tell me what else
>should cause this problem, if not PHP / OCI8?

Sure. I'd look in Oracle or in the client library.
With such an old version it's no wonder there are problems.

Though, we can try do it this way:
Please install 5.1.1 and make sure it does work fine.
Then I'll need an unprivileged ssh account on your machine to install
5.2.1, reproduce the problem and investigate it.
I'll also need Oracle connection details.

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

[2007-02-20 07:52:53] marvin at chag dot net

open again

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

[2007-02-19 13:37:20] marvin at chag dot net

Hi Tony2001, 

The only change to our systems is switching between PHP <= 5.1.1 and
PHP >= 5.1.2 (today it was 5.2.1). 

The result is: for PHP <= 5.1.1 the database connections are working
fine and for PHP >= 5.1.2 they are not.

So I kindly ask, wether you please can tell me what else should cause
this problem, if not PHP / OCI8?
 
Sadly upgrading this databases in this special configuration is no
option. PHP documentation http://de.php.net/manual/en/ref.oci8.php
states that OCI8 can be used for Oracle 7 and 8 databases, though.

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

[2007-02-19 13:14:41] [EMAIL PROTECTED]

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

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

[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