Date: 10/26/00
- Next message: Alexander Feldman: "[PHP-DEV] session_unset() question"
- Previous message: sasha <email protected>: "[PHP-DEV] PHP 4.0 Bug #7477 Updated: Session Write Failure"
- Next in thread: sasha <email protected>: "[PHP-DEV] PHP 4.0 Bug #7477 Updated: Session Write Failure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 7477
User Update by: tim.parkin <email protected>
Status: Assigned
Bug Type: *Session related
Description: Session Write Failure
Ater posting this I removed the session_module command and it started working... I am going to try replicating this behaviour on my home system and report here on my findings..
Tim Parkin
Previous Comments:
---------------------------------------------------------------------------
[2000-10-26 05:00:09] tim.parkin <email protected>
I am having major problems getting a custom session handler (oci8 based) to work in php-4.0.2 and php-4.0.3. I have set session.save_handler=user in the php.ini file and it registers in phpinfo(). I have also set the module_name specifically using :
session_module_name('user');
The problem is that the write function does not work. I have seen many posts showing the same problem (admittedly some of them are a result of not setting save_handler) and as yet have found no 'official' response.
This seems to have been around since 4.0.1pl2.
I have tried printing from the write function and also writing to a file whilst presuming that the session write is not called till after the page has finished processing.
This is a major blow to a project we are working on. We can find ways around this but it has knocked our confidence in PHP somewhat.
A prompt reply would be greatly appreciated.
dev environment
Sun Sparce Ultra 5
Solaris 8
APACHE-1.3.12
./configure --with-layout=Apache --prefix=/usr/local/apache --enable-module=so --enable-module=rewrite --enable-module=log_referer --enable-module=info --enable-module=status --add-module=src/modules/standard/mod_rewrite.c --add-module=src/modules/standard/mod_log_referer.c --add-module=src/modules/standard/mod_info.c --add-module=src/modules/standard/mod_status.c --enable-shared=max --server-uid=oracle --server-gid=dba
PHP-4.0.2
./configure --with-apxs=/usr/local/apache/bin/apxs --enable-track-vars=yes --enable-bcmatch=yes --enable-memory-limit=yes --enable-magic-quotes=yes --enable-trans-sid=yes --enable-nodebug=yes --with-oci8=$ORACLE_HOME/lib--with-oracle=$ORACLE_HOME/lib --without-mysql --enable-libgcc
Tim Parkin
Web Development Manager
Didio Communications
oci_session_handler is avaialable on request although the normal test handler fails to write also ie..
<?php
function open ($save_path, $session_name) {
echo "open ($save_path, $session_name)n";
return true;
}
function close () {
echo "closen";
return true;
}
function read ($key) {
echo "read ($key)n";
return "foo|i:1;";
}
function write ($key, $val) {
echo "write ($key, $val)n";
// Test to see if output to page is failing due to write being executed after user output is finished
$fp = fopen("temp",w);
fwrite($fp,"write ($key, $val)",4096);
fclose($fp);
return true;
}
function destroy ($key) {
return true;
}
function gc ($maxlifetime) {
return true;
}
session_set_save_handler ("open", "close", "read", "write", "destroy", "gc");
?>
Thanks
php.ini
;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
variables_order = "EGPCS"
register_globals = On
register_argc_argv = On
track_vars = On
gpc_order = "GPC"
; Magic quotes
magic_quotes_gpc = On
magic_quotes_runtime = On
magic_quotes_sybase = Off
; automatically add files before or after any PHP document
auto_prepend_file =
auto_append_file =
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7477
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Alexander Feldman: "[PHP-DEV] session_unset() question"
- Previous message: sasha <email protected>: "[PHP-DEV] PHP 4.0 Bug #7477 Updated: Session Write Failure"
- Next in thread: sasha <email protected>: "[PHP-DEV] PHP 4.0 Bug #7477 Updated: Session Write Failure"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

