>PHP: Mohawk Software Session Handler Functions - Manual

MANUAL DE PHP

(y algo mas)windsurf pozo izquierdo
Google
search for in the  
ELMARRAJO.COM mysql bulma desarrollo web linux fedora html ayuda

windsurf mercedes camper

LXXXV. Mohawk Software Session Handler Functions

Introducción

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.

Nota: Esta extensión no está disponible en plataformas Windows

Instalación

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

Tabla de contenidos
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


add a note add a note User Contributed Notes
Mohawk Software Session Handler Functions
xoach at free dot fr
21-Jul-2006 09:42
Has been renamed to Mcache, improved, and is available at http://www.mohawksoft.org/
martijn at pocos dot nl
16-Aug-2005 04:42
Trying to build PHP 5.0.4. with msession support (shared), I found that the build process still fails to link the proper libraries. I think the proper way to fix this, is to change ext/msession/config.m4 and rebuild configure.

Find the line that reads:

PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_DIR/lib", PHOENIX_LIB)

And replace it with these two lines:

PHP_ADD_LIBRARY_WITH_PATH(phoenix, "$PHOENIX_DIR/lib", MSESSION_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(stdc++, "", MSESSION_SHARED_LIBADD)

Next find the line that reads:

PHP_SUBST(PHOENIX_LIB)

and replace it with:

PHP_SUBST(MSESSION_SHARED_LIBADD)

Now rebuild "configure":

$ rm configure
$ ./buildconf --force

Now ./configure && make && make install as usual.
markw at mohawksoft dot com
13-Aug-2005 05:10
Hi all, I'm the author of the msession daemon. I haven't done any actual work on it in a couple years. Suddenly, I find myself needing it again. It's current state is almost certainly VERY different than you are used too, and it as been renamed to mcache (internally to Mohawk Software). I may ramp up work on it again.

In the course of the 5 years that msession being made available, I've gotten a lot of calls for support, and one bug fix. (And not a single donation BTW)

A decisions needs to be made if "mcache" will continue to be available.  I don't mind people using it, I don't mind that I've made no money on it (that's not why I wrote it), but the desperate "my server farm is down" calls because a working system died when the admin deployed changes with out adaquite testing are a huge distraction. In good conscience, I can't let the poor guy twist in the wind, but sometimes it takes hours to fix. Hours away from work that pays my bills or my family. Apache 2.0 with multiple threads really caused a lot of problems.

So, I guess what I'm saying is this: msession will become mcache (publically) some time in the future. On modern hardware it can handle about 5,000 ~10,000 session transactions a second (depending on the amount of data in the session, and the conectivity to the nodes, etc.) I may keep it on my server, but I can't support it for you without being paid up front. If you use it: learn it, know it, live it, and contribute if you can.
08-Aug-2005 05:29
I could not compile it on FreeBSD. On a 4.x msession complained about missing pthread library. On a 5.x, it was not happy with malloc.h. Ok, I could dig into that problem and find the problem. But I was not motivated...

I found that there is 1 100% PHP Solution for distributed session handling:
http://pear.php.net/package/HTTP_SessionServer/
sgaffga at electronicpartner dot de
14-Jul-2005 02:18
We wanted to use the default-PHP4-RPMs delivered with RedHat and SuSE, and use msession, too. But there is no package containing the precompiled msession-support for PHP. So I did this on my own and I found it very hard, so I'd like to provide the solution here.

The files php-msession-030117.tar.gz, phoenix-R1_2_030117E.tar.gz and msession-030130.tar.gz are
available at www.mohawksoft.com.

## Compiling the phoenix lib
tar xzf phoenix-R1_2_030117E.tar.gz
tar xzf msession-030130.tar.gz
cd phoenix/src/
cp Linux.mak config.mak
vi unixgcc.mak
(Now change "-I$(POSTGRES_HOME)/include" to "-I /usr/include/pgsql" which is needed to compile using SuSE 9.3)
make
mkdir ../lib
make install

## Compiling msession server
cd ..
cd msession
make
mkdir ../bin
make install

## Now untar PHP-Source and replace the files in ext/msession/ with the ones supplied by php-msession-030117.tar.gz
## Configure PHP and include --with-msession=shared,/path/to/phoenix-src-used-above
## Please note: Compile will fail if you use --disable-session or --disable-all
## For example use:
./configure --prefix=/usr/local --with-config-file-path=/etc --disable-all --enable-session --with-msession=shared,/home/sga/compile/phoenix

make

## Now there is a msession.so in modules/, but this one does NOT work yet.
## I had to repeat the libtool-command with "--mode=link gcc" and add some libs:
## before the last parameter I added:
## -lstdc++ -lodbc -L/home/sga/compile/phoenix/lib/ -lphoenix
## This was the command I used (you will have to use other paths of course)
/bin/sh /home/sga/compile/php-4.3.10/libtool --silent --preserve-dup-deps --mode=link gcc -DPHP_ATOM_INC -I/home/sga/compile/php-4.3.10/include -I/home/sga/compile/php-4.3.10/main -I/home/sga/compile/php-4.3.10 -I/home/sga/compile/php-4.3.10/Zend -I/home/sga/compile/php-4.3.10/ext/xml/expat  -I/home/sga/compile/php-4.3.10/TSRM  -g -O2  -o ext/msession/msession.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/sga/compile/php-4.3.10/modules  -lstdc++ -lodbc -L/home/sga/compile/phoenix/lib/ -lphoenix ext/msession/msession.lo

## Now I could do:

cp ext/msession/.libs/msession.so /usr/local/lib/php/extensions/no-debug-non-zts-20020429

## (Please note the different location I copy the module from)
## Adjust your php.ini to contain "extension=msession.so" and
## "extension_path =/usr/local/lib/php/extensions/no-debug-non-zts-20020429"

rcapache2 restart

## Now it worked fine! I hope this helps someone.
r_linux at yahoo dot com
13-Apr-2005 08: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 01: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.
Weird Silence
01-Feb-2005 05: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 03: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 09:02
msession 1.0 (020603) is using /dev/urandom.
a dot whyte at cqu dot edu dot au
09-May-2002 05: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 03: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

Citas célebres

Los poetas son magníficos para decirte dónde está el alma del país.

Inge Morath
Fotógrafa austríaca
(1923-2002)
Citas en tu mail
©Contenidos Gratis

Ilusiones Opticas
ilusion_optica_038.jpg
Contenidos Web

Chiste de... Mamá, mamá
Guasón

- Mamá, mamá, ¿tienes leche fría?

- Sí, hijo.

- Pues caliéntamela.
Chistes en tu mail
©ContenidosGratis

Humor Gráfico
humor_grafico_019.jpg
Contenidos Web

Inicio | Acción | Estrategia | Palabras | Puzzles | Solitarios | Foro Trucos
Cake ManiaCake Mania
Jugadores: 6835
Categoría del juego: Acción
Objetivo del juego: Ayuda a Jill a recuperar la pastelería de su abuela llevando su propia pastelería; consigue clientes y gana dinero.
Rainbow WebRainbow Web
Jugadores: 2199
Categoría del juego: Puzzles
Objetivo del juego: Rompe un pegajoso hechizo y salva un reino de fantasía en Rainbow Web. Tendrás toneladas de diversión mientras juegas a este mágico desafío para la mente.
Mahjongg FortunaMahjongg Fortuna
Jugadores: 12462
Categoría del juego: Solitarios
Objetivo del juego: Velocidad y habilidad mental son las armas más importantes en esta versión de un antiguo juego asiático. Despeja el tablero lo antes posible haciendo clic en las fichas iguales y gánate la fama eterna de la puntuación más alta.
Chainz 2Chainz 2
Jugadores: 6955
Categoría del juego: Puzzles
Objetivo del juego: Entra en el mundo de las combinaciones con Chainz 2: Relinked, emocionante secuela del exitazo del año pasado, Chainz. Gira eslabones y crea combinaciones de 3 ó más.
DeliciousDelicious
Jugadores: 4405
Categoría del juego: Acción
Objetivo del juego: ¿Eres un as de la multitarea? ¿Quieres que tus clientes estén contentos? ¡Pues Delicious es tu juego! Sacia el apetito de los clientes y tenlos contentos; ¡no te arriesgues!
BookwormBookworm
Jugadores: 4568
Categoría del juego: Palabras
Objetivo del juego: Junta las letras para formar palabras. ¡Las palabras más largas valen más puntos!
ZumaZuma
Jugadores: 4976
Categoría del juego: Acción
Objetivo del juego: Controla el ídolo de la rana de piedra de los antiguos Zuma en este intrigante enigma de acción. ¡Dispara bolas para formar conjuntos de tres, pero si dejas que lleguen a la calavera dorada morirás!
Jewel of AtlantisJewel of Atlantis
Jugadores: 3798
Categoría del juego: Puzzles
Objetivo del juego: Descubre la ciudad hundida de la Atlántida y busca valiosos tesoros. Viaja más allá de las profundidades del mar y vive trepidantes aventuras en Jewel of Atlantis.
Jewel QuestJewel Quest
Jugadores: 3727
Categoría del juego: Puzzles
Objetivo del juego: Convierte la arena de la antigua selva en oro tan rápido como puedas juntando grupos de 3 elementos. ¡Los grupos más grandes valen más puntos!
Bejeweled 2Bejeweled 2
Jugadores: 3659
Categoría del juego: Puzzles
Objetivo del juego: Con cuatro modos de juego únicos y fascinantes, nuevas piezas de juego explosivas e imponentes fondos planetarios, Bejeweled 2 es mucho más adictivo que nunca.
Contenidos gratis en tu webSiguiente >>

Fotos divertidas
fotos_increibles_0260.jpg
Contenidos Web
microrobots avion deportes riesgo recetas cocina canaria juegos online gratis moto motociclismo horoscopos naranjas valencianas surf canarias montañismo ciudades turismo postales gratis library Horoscopos Diarios Windsurf Canarias
fregadero microondas placa electrica bañopreparar camper pantalla plananevera compresor electricacamper fiat ducato camper baño quimicomampara enrollable bañocamper aire climatizadofurgoneta surf windsurffurgoneta surf windsurftelevisor furgonetas camperfurgonetas camper cama

Sudoku del día
Nivel de dificultad: Fácil



Cómo jugar:
El juego consiste en colocar los números del 1 al nueve de tal forma que no se repita el mismo número en la columna, fila y caja (bloques 3x3 enmarcados).

©Contenidos Gratis | Sudoku en tu mail
Sucedió el...

30 de agosto de 1617

Fallece Santa Rosa de Lima, por la que se celebra el "Día de la Patrona de América".
Efemérides en tu mail
©Contenidos Gratis
windsurf canarias youtube porno canarias baleares valencia madrid