You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Tatsuhiko Miyagawa <mi...@edge.co.jp> on 2002/03/14 09:40:28 UTC
[ANNOUNCE] PHP::Session
Announcing new module: PHP::Session.
This module enables you to read / write (write is not yet implemented
though) PHP4-builtin session files from Perl. Then you can share
session data between PHP and Perl, without changing PHP code, which
may be a hard work for us Perl hackers.
This is something you'll never want to do, but imagine the cases where
you should co-work with PHP coders, or take over another company's PHP
code.
NAME
PHP::Session - read / write PHP session files
SYNOPSIS
use PHP::Session;
my $session = PHP::Session->new($id);
# session id
my $id = $session->id;
# get/set session data
my $foo = $session->get('foo');
$session->set(bar => $bar);
# remove session data
$session->unregister('foo');
# remove all session data
$session->unset;
# check if data is registered
$session->is_registerd('bar');
# save session data (*UNIMPLEMENTED*)
$session->save;
DESCRIPTION
PHP::Session provides a way to read / write PHP4 session files, with
which you can make your Perl applicatiion session shared with PHP4.
TODO
* saving session data into file is UNIMPLEMENTED.
* WDDX support, using WDDX.pm
* "Apache::Session::PHP"
AUTHOR
Tatsuhiko Miyagawa <mi...@bulknews.net>
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
SEE ALSO
the WDDX manpage, the Apache::Session manpage
--
Tatsuhiko Miyagawa <mi...@edge.co.jp>
Re: [ANNOUNCE] PHP::Session
Posted by Tatsuhiko Miyagawa <mi...@edge.co.jp>.
At Mon, 18 Mar 2002 15:46:20 -0600,
Jim Smith wrote:
> > > Will there be a way to specify each of the actions as PHP allows?
> > > For example, in a project I have, we use PHP4 sessions, but they are
> > > stored in a MySQL table so they can be shared across web machines
> > > without worrying about NFS problems.
> >
> > You're very happy :)
> > Then you don't have to play with this module of nightmare.
>
> I tried to write such a module last year. PHP sessions are a bit of
> a nightmare to parse efficiently, afaik. I'm glad someone's gone to
> the trouble to try and make a usable and distributable module.
Exactly, it *is* a nightmare. See my dirty duplicated source code!
I guess the format is designed to be easily parsed by C, but very
difficult by Perl :)
--
Tatsuhiko Miyagawa
Re: [ANNOUNCE] PHP::Session
Posted by Jim Smith <jg...@moya.tamu.edu>.
On Tue, Mar 19, 2002 at 06:03:56AM +0900, Tatsuhiko Miyagawa wrote:
> At Mon, 18 Mar 2002 14:06:56 -0600,
> Jim Smith wrote:
>
> > Will there be a way to specify each of the actions as PHP allows?
> > For example, in a project I have, we use PHP4 sessions, but they are
> > stored in a MySQL table so they can be shared across web machines
> > without worrying about NFS problems.
>
> You're very happy :)
> Then you don't have to play with this module of nightmare.
I tried to write such a module last year. PHP sessions are a bit of
a nightmare to parse efficiently, afaik. I'm glad someone's gone to
the trouble to try and make a usable and distributable module.
--jim
Re: [ANNOUNCE] PHP::Session
Posted by Tatsuhiko Miyagawa <mi...@edge.co.jp>.
At Tue, 19 Mar 2002 06:03:56 +0900,
Tatsuhiko Miyagawa wrote:
> > Basically, it would be nice to have PHP::Sessions provide the
> > serialization mechanism for use by Apache::Session without it
> > worrying about how to store the information.
>
> Yes, what I'm planning now is Apache::Sesion::PHP, which gives your a
> way to handle PHP4 session files transparently via Apache::Session
> interface.
Current implementation of PHP::Session is already modularized enough
for you to use serialization part as a standalone code. See
PHP::Session::Serializer::PHP for it. (Though its synopsis says "DONT
USE THIS MODULE DIRECTLY" :))
--
Tatsuhiko Miyagawa <mi...@edge.co.jp>
Re: [ANNOUNCE] PHP::Session
Posted by Tatsuhiko Miyagawa <mi...@edge.co.jp>.
At Mon, 18 Mar 2002 14:06:56 -0600,
Jim Smith wrote:
> Will there be a way to specify each of the actions as PHP allows?
> For example, in a project I have, we use PHP4 sessions, but they are
> stored in a MySQL table so they can be shared across web machines
> without worrying about NFS problems.
You're very happy :)
Then you don't have to play with this module of nightmare.
> Basically, it would be nice to have PHP::Sessions provide the
> serialization mechanism for use by Apache::Session without it
> worrying about how to store the information.
Yes, what I'm planning now is Apache::Sesion::PHP, which gives your a
way to handle PHP4 session files transparently via Apache::Session
interface.
--
Tatsuhiko Miyagawa
Re: [ANNOUNCE] PHP::Session
Posted by Jim Smith <jg...@moya.tamu.edu>.
On Mon, Mar 18, 2002 at 07:27:40PM +0900, Tatsuhiko Miyagawa wrote:
> Now PHP::Session 0.05 with save/destory implementation is going on its
> way to CPAN.
>
> 0.05 Mon Mar 18 16:36:27 JST 2002
> * added Boolean type (ext/var.h in PHP source code)
>
> 0.04 Fri Mar 15 16:14:32 JST 2002
> * added destroy()
>
> 0.03 Fri Mar 15 16:01:35 JST 2002
> * added session ID validation
> * implemented save()
Will there be a way to specify each of the actions as PHP allows?
For example, in a project I have, we use PHP4 sessions, but they are
stored in a MySQL table so they can be shared across web machines
without worrying about NFS problems.
Basically, it would be nice to have PHP::Sessions provide the
serialization mechanism for use by Apache::Session without it
worrying about how to store the information.
--jim
Re: [ANNOUNCE] PHP::Session
Posted by Tatsuhiko Miyagawa <mi...@edge.co.jp>.
Now PHP::Session 0.05 with save/destory implementation is going on its
way to CPAN.
0.05 Mon Mar 18 16:36:27 JST 2002
* added Boolean type (ext/var.h in PHP source code)
0.04 Fri Mar 15 16:14:32 JST 2002
* added destroy()
0.03 Fri Mar 15 16:01:35 JST 2002
* added session ID validation
* implemented save()
At Thu, 14 Mar 2002 17:40:28 +0900,
Tatsuhiko Miyagawa wrote:
>
> Announcing new module: PHP::Session.
>
> This module enables you to read / write (write is not yet implemented
> though) PHP4-builtin session files from Perl. Then you can share
> session data between PHP and Perl, without changing PHP code, which
> may be a hard work for us Perl hackers.
>
> This is something you'll never want to do, but imagine the cases where
> you should co-work with PHP coders, or take over another company's PHP
> code.
--
Tatsuhiko Miyagawa