search for in the  
<udm_set_agent_parammsession_connect>
Last updated: Thu, 19 May 2005

LXXVI. Mohawk Software Session Handler Functions

Introduction

msession is an interface to a high speed session daemon which can run either locally or remotely. It is designed to provide consistent session management for a PHP web farm. More Information about msession and the session server software itself can be found at http://devel.mohawksoft.com/msession.html.

Note: This extension is not available on Windows platforms.

Installation

To enable Msession support configure PHP --with-msession[=DIR], where DIR is the Msession install directory.

Table of Contents
msession_connect -- Connect to msession server
msession_count -- Get session count
msession_create -- Create a session
msession_destroy -- Destroy a session
msession_disconnect -- Close connection to msession server
msession_find -- Find all sessions with name and value
msession_get_array -- Get array of msession variables
msession_get_data -- Get data session unstructured data
msession_get -- Get value from session
msession_inc -- Increment value in session
msession_list -- List all sessions
msession_listvar -- List sessions with variable
msession_lock -- Lock a session
msession_plugin -- Call an escape function within the msession personality plugin
msession_randstr -- Get random string
msession_set_array -- Set msession variables from an array
msession_set_data -- Set data session unstructured data
msession_set -- Set value in session
msession_timeout -- Set/get session timeout
msession_uniq -- Get unique id
msession_unlock -- Unlock a session


User Contributed Notes
Mohawk Software Session Handler Functions
norbert at gmx dot net
05-May-2005 03:57
The product itself is *not* fine! It works properly with SuSE 9.0 and below, but not anymore with SuSE 9.1 and higher. It also fails on the latest RedHat, so i strongly belive it has problems with the newer Linux-Kernels. Therefore, i keep my mind: a package that is not maintained and documented well should be removed from PHP.
r_linux at yahoo dot com
13-Apr-2005 10:33
To compile with --with-msession, you have to make a change in Makefile to add -lstdc++. For me the LDFLAGS=-lstdc++ before ./configure don't work.

That modification works for me:
sed -e 's/^\(EXTRA_LIBS\)\(.*\)$/\1\2 -lstdc++/g' Makefile -i

I think that have some better way to do it.
temp6453 at hotmail dot com
10-Mar-2005 03:21
A company I work for uses msession for a large cluster of servers.  I've set it up rather regularly and never had an issue at all with it not working.

Msession is stable.  It does something simple- it maintains an efficient database of key->value (session->data) pairs and searches them well in a nice threaded manner.  There is no need for constant revision.  It is _NOT_ a large application.  It's security is simply IP-block-based, so such concerns are also minimal.

To the user that says it should be removed- if you are having problems installing it, seek assistance doing so.  The product itself is just right.
norbert_gt at gmx dot net
14-Feb-2005 08:49
Do NOT use msession!!! On the lates distributions (Redhat, Suse) the msessions won't work anymore: the daemon won't fork at startup time and stucks after called once. I've tested this on three systems (e.g. SuSE 9.1.). Furthermore, the msessiond package is NOT supported/maintained since years. i recommend to remove it from the offical php distribution. Norbert.
Weird Silence
01-Feb-2005 07:19
We've created a distributed session handler that uses memcached - Check it out at http://weirdsilence.net/software/memsession/ - It's free and open source!
It uses Danga.com's memcached: http://danga.com/memcached/ - Very cool stuff!
aderyngmailcom
06-Nov-2004 05:52
Compiling msession can be quite a pain. Believe me.

Here's how I did it on a gentoo-box with gcc version 3.3.4 (20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6)):

1. Download http://www.mohawksoft.com/devel/phoenix-R1_2_030117E.tar.gz and http://www.mohawksoft.com/devel/msession-030130.tar.gz
2. Extract them in /usr/local (That path is hardcoded, so you don't really have a choice since there isn't a configure script)
3. You should now the directory /usr/local/phoenix containing msession and src.
4. Enter the src-directory and rename Linux.mak to config.mak (or the corresponding file, if you're using another system. Don't use unixgcc.mak directly - it won't work.).
5. Type make
6. Type make install. You might have to create /usr/local/phoenix/lib yourself and then type make install again.
7. Change into the msession-directory and type make.

For both msession and phoenix you may have to edit the makefiles manually and comment out the postgreesql and odbc-code (if you don't have postgree installed).

8. Recompile php with --with-msession.

Voilá!
mathijs at experimental dot net
13-Sep-2002 11:02
msession 1.0 (020603) is using /dev/urandom.
a dot whyte at cqu dot edu dot au
09-May-2002 07:53
You can fix the no random data in FreeBSD's /dev/random by using rndcontrol (as root) and setting the interupts which it looks at for entropy.

Something like  rndcontrol -s 14 -s 15  should help it out.
carsten at sarum dot dk
06-May-2002 05:12
If you have trouble connecting to the msessiond from a php-script, this might be the solution for you.

msessiond (and your php-extension) both use the libphoenix.a which, among other files, is built from a file called "mutils.cpp".

Open this file, and find a line saying:

FILE *f = fopen("/dev/random", "rb");

(I believe it is line 506. There's only this one.)

On my FreeBSD 4.5 Tiny, /dev/random seldom spits out data, so the program hangs on the next line (an fread() call). Use /dev/urandom instead, it always sends data.

Change the line above to:

FILE *f = fopen("/dev/urandom", "rb");

Then rebuild phoenix-lib, msessiond, and PHP. You might want to do a "make clean" to be sure the change is noted.

- Carsten

<udm_set_agent_parammsession_connect>
 Last updated: Thu, 19 May 2005
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: The Server Pages
Last updated: Thu May 19 17:35:34 2005 CDT