Re: PHP 4.0 Bug #5724: Write-Hanlder. When session_set_save_handler defined, write handler not called
| From: | Joey Smith | Date: | Fri, 21 Jul 2000 19:03:51 +0000 |
| Subject: | Re: PHP 4.0 Bug #5724: Write-Hanlder. When session_set_save_handler defined, write handler not called | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-25374@lists.php.net to get a copy of this message | ||
Jesper:
Which version of PHP are you running?
On Fri, 21 Jul 2000, Jesper Juhl wrote the following to php-dev@lists.php.net :
>
>
> Well, I don't seem to have any problems with your script.
>
> Here's the output of running the script on my server:
>
>
> session_open called
> session read called
> session gc called
> session write called
> session close called
>
>
> My version of PHP is 4.0.0 - compiled like this:
>
> './configure' '--with-mysql'
> '--with-apxs=/usr/local/apache/bin/apxs'
>
> '--with-config-file-path=/etc/httpd' '--enable-calendar'
> '--enable-trans-sid'
> '--enable-versioning' '--enable-track-vars'
> '--with-gd' '--with-jpeg-dir'
> '--with-tiff-dir' '--with-png-dir'
> '--with-ttf' '--with-zlib-dir'
> '--enable-memory-limit=yes'
> '--with-openssl' '--disable-debug'
>
>
> Running on Apache/1.3.12 (Unix) PHP/4.0.0 mod_ssl/2.6.4 OpenSSL/0.9.5a
>
>
>
> Best regards,
> Jesper Juhl
> Juhl@eisenstein.dk
>
>
> > From: mepooky@freesurf.ch
> > Operating system: linux
> > PHP version: 4.0 Release Candidate 2
> > PHP Bug Type: Session related
> > Bug description: Write-Hanlder. When session_set_save_handler defined,
> write handler not called
>
> > <?php
> > // sess_write never gets called
>
> > function sess_open($save_path, $session_name) {
> > echo "session_open called<br>";
> > return true;
> > }
>
> > function sess_close() {
> > echo "session close called<br>";
> > return true;
> > }
>
> > function sess_read($key) {
> > echo "session read called<br>";
> > return true;
> > }
>
> > function sess_write($key, $val) {
> > echo "session write called<br>";
> > return true;
> > }
>
> > function sess_destroy($key) {
> > echo "session destroy called<br>";
> > return true;
> > }
>
> > function sess_gc($maxlifetime) {
> > echo "session gc called<br>";
> > return true;
> > }
>
> > session_set_save_handler(
> > "sess_open",
> > "sess_close",
> > "sess_read",
> > "sess_write",
> > "sess_destroy",
> > "sess_gc");
>
> > class session{
> > Function Session() {
> > global $sessionActual;
>
> > session_start();
> > session_register( sessionActual );
> > }
> > Function addHistory( ) {
> > global $sessionActual;
>
> > if ( !isset( $sessionActual ) )
> > $sessionActual = 0;
> > else
> > $sessionActual += 1;
> > }
> > }
>
> > $my_session = new session();
> > $my_session->addHistory();
> > ?>
>
> > configured with:
> > './configure' '--with-mysql' '--with-apxs'
> > '--enable-trans-sid'
>
>
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-dev-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>