[imp] Horde-RC2 & Oci8 SessionHandler Problems

Sebastián Calero scalero at datadec.es
Fri Dec 3 03:48:30 PST 2004


I make several tests and I think the problem comes with the use of the 'session_regenerate_id()' function with Oracle like session handler. 
I don't know this functions is executing but I always obtain the error:
[Thu Dec 3 12:10:00 2004] [error] PHP Warning:  save(): OCILobWrite: OCI_INVALID_HANDLE in /test/horde/lib/Horde/SessionHandler/oci8.php

'session_regenerate_id()' is called in Horde::getCleanSession(), if I modify this like:

    function getCleanSession()
    {
            @session_destroy();
            if (Util::extensionExists('posix')) {
                $new_session_id = md5(microtime() . posix_getpid());
            } else {
                $new_session_id = md5(uniqid(mt_rand(), true));
            }
            session_id($new_session_id);
            // Restart the session, including setting up the session
            // handler.
            Horde::setupSessionHandler();
            @session_start();
    }

All works fine with Oracle again.

I found this links related:
http://bugs.php.net/bug.php?id=24843
http://groups.google.es/groups?hl=es&lr=&threadm=cfeon5%2430kt%241%40FreeBSD.csie.NCTU.edu.tw&rnum=1&prev=/groups%3Fhl%3Des%26lr%3D%26q%3DgetCleanSession

I send this post just in case it can help somebody...

Greetings and thanks.
 
Sebastian Calero.
 

	-----Mensaje original----- 
	De: imp-bounces at lists.horde.org en nombre de Jan Schneider 
	Enviado el: lun 29/11/2004 14:10 
	Para: imp at lists.horde.org 
	CC: 
	Asunto: Re: [imp] Horde-RC2 & Oci8 SessionHandler Problems
	
	

	Zitat von Sebastián Calero <scalero at datadec.es>:
	
	>
	> I am testing Horde 3.0, IMP 4.0, Turba 2.0,... RC2 versions with
	> Oracle 10g like backend for all of them.
	>
	> I use Apache 1.3.31 & php 4.3.8 compiled with '--enable-debug', and
	> the test page don't show any errors.
	>
	> Well, I see this errors in my Apache 'error_log':
	> 1.- When I Open the 'login.php' page of Horde
	>     [Mon Nov 29 11:53:06 2004] [notice] child pid 110158 exit signal
	> Segmentation fault (11)
	>     [Mon Nov 29 11:53:07 2004] [error] PHP Warning:  String is not
	> zero-terminated (C) (source: /php-4.3.8/Zend/zend_execute_API.c:291)
	> in /test/horde/lib/Horde/SessionHandler/oci8.php on line 140
	>     /php-4.3.8/Zend/zend_hash.c(232) : ht=0x404f13a0 is being cleaned
	>     /php-4.3.8/Zend/zend_hash.c(547) : ht=0x404f13a0 is being cleaned
	>     [Mon Nov 29 11:53:07 2004] [error] PHP Warning:  Unknown(): A
	> session is active. You cannot change the session module's ini
	> settings at this time. in Unknown on line 0
	>
	>      If I comment the 'Horde::logMessage...' line the error disappears.
	
	This looks like a really weird error in the PHP engine. We might trigger
	this, but we can't fix it. Try upgrading to PHP 4.3.9 or 4.3.10-RC1.
	
	> 2.- In the login page I introduce my user&password and I login
	> success but Horde redirect me to the login page again:
	>
	>     [Mon Nov 29 12:02:01 2004] [error] PHP Warning:  save():
	> OCILobWrite: OCI_INVALID_HANDLE in
	> /test/horde/lib/Horde/SessionHandler/oci8.php on line 144
	
	Looking at the code this shouldn't happen, but I addded an extra check to
	the driver that might give an earlier error message. Try this patch:
	
	http://cvs.horde.org/diff.php/framework/SessionHandler/SessionHandler/oci8.php?r1=1.7&r2=1.8&ty=u
	
	Jan.
	
	--
	Do you need professional PHP or Horde consulting?
	http://horde.org/consulting/
	--
	IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
	Frequently Asked Questions: http://horde.org/faq/
	To unsubscribe, mail: imp-unsubscribe at lists.horde.org
	



More information about the imp mailing list