PHP 4.0 Bug #5519: session handler and php4.0.1pl2 - missing write/close calls ?

From: Date: Tue, 11 Jul 2000 20:30:35 +0000
Subject: PHP 4.0 Bug #5519: session handler and php4.0.1pl2 - missing write/close calls ?
Groups: php.dev 
Request: Send a blank email to php-dev+get-24122@lists.php.net to get a copy of this message
From: kronos_2k@hotmail.com Operating system: Linux 2.2.13 PHP version: 4.0.1pl2 PHP Bug Type: Session related Bug description: session handler and php4.0.1pl2 - missing write/close calls ? Hi The following script is from the php4 documentation <?php function open ($save_path, $session_name) { echo "open ($save_path, $session_name)\n"; return true; } function close () { echo "close\n"; return true; } function read ($key) { echo "read ($key)\n"; return "foo|i:1;"; } function write ($key, $val) { echo "write ($key, $val)\n"; return true; } function destroy ($key) { return true; } function gc ($maxlifetime) { return true; } session_set_save_handler ("open", "close", "read", "write", "destroy", "gc"); session_start(); echo $foo; ?> On my computer at work running on php4.0 it executes perfectly with the following output: open (/tmp, PHPSESSID) read (f4a6e6cb93bdb1b36fcedc7ea1283780) 1 write (f4a6e6cb93bdb1b36fcedc7ea1283780, foo|i:1;) close On my computer at home running on php4.01pl2 (latest version I think) the write and close function is never called: open (/tmp, PHPSESSID) read (2c0b4ffcf5076fa5b99cb93e672445e9) 1 Both installations have identical php.ini files. The only difference is that I included some more libraries at home. Here's my current configure line: './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mysql=/usr/local/mysql' '--with-zlib=/usr' '--with-gd=/usr/local' '--with-png-dir=/usr/local' '--with-jpeg-dir=/usr/local' '--enable-ftp' '--enable-track-vars' '--enable-magic-quotes' '--disable-debug' '--disable-short-tags' I don't exactly know if it is a bug or just a misconfiguration. Maybe it's of some help to you. See ya kronos_2k

« previous php.dev (#24122) next »