[EMAIL PROTECTED] wrote:
> On Wed, 10 Apr 2002, Yasuo Ohgaki wrote:
>
>
>>PS: I've already added $_APP to session_pgsql that can be used
>>as application variable. If msession and SRM supports it, it
>>would be great. (I know SRM has other way to do the same :)
>
>
> How exactly does $_APP work in session_pgsql, can where can I find the
> source for it?
session_pgsql is in /pear/PCEL/session_pgsql/
How it works is very simple.
This is what it does,
1) Get 'session_name' as Application name and use 'session_name'
as key for application value store in session storage.
2) Load application variable.
3) Unserizalize data and initialize $_APP as auto global.
4) Serialize $_APP, then save back to session storage.
Current session_pgsql does not do any locking unless user uses
'serializable' transaction isolation level. Therefore, dirty
read is possible by default.
I think SRM/msession can implement lock/unlock feature easily
for better $_APP handling. (If you are going to implement
lock/unlock, I'll implment it with the same API in
session_pgsql also)
If we need some security for $_APP, we need 'access_key'
like I mentioned for persistent variable module.
(It's not perfect, but it's okay for most purposes. If user
needs higher security, one should use dedicated server. IMO)
--
Yasuo Ohgaki
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php