NYCPHP Meetup

NYPHP.org

[mambo] Howto add session variables to Mambo 4.5.x

Hans C. Kaspersetz hans at cyberxdesigns.com
Sun Jul 10 11:32:07 EDT 2005


Just to clarify my position, I am not complaining about the current 
implementation.  I was complaining about the fact that there was no 
straight forward resource that I could find that described how to add 
new session variables.  I wanted to make that resource available to 
other users of the 4.5.x branch.  As a matter of fact, I found modifying 
the current implementation to be very easy and straight forward once I 
put the pieces together.  Add a variable here, update a table there and 
remember to update().  Whammooo done.  I have see some other 
implementation of custom session handlers that were much harder to change.

I have no problems with the way sessions are handled now in Mambo.  
Other then I have to modify Mambo.php.  Maybe the session class should 
be broken out of the core and into a library.  This way when the core is 
patched, modifications to the session code are not impacted.  Seems like 
session code might be an area that is regularly modified.

I agree with two things Mambo has done.  1. Use a database to store 
session data.  2. Limiting the amount of data stored in session.  I like 
the fact that having a higher than normal barrier to implementation on 
session data has limited the amount of session data carried around.  I 
think all to often, and I am offender, too much is stuck in session.

Enjoy the lovely weather today!
Hans


Hans C. Kaspersetz
Cyber X Designs

http://www.cyberxdesigns.com



Mitch Pirtle wrote:

>I am in agreement with you Hans, and think we need to provide for this
>in the API.
>
>The existing implementation is not up to snuff, but we are trying to
>get 4.5.3 out the door so it will not make it in this release.
>
>Just thinking out loud, we have two realistic approaches for the 4.6 release:
>
>    1) rewrite the session class to not require core/table mods
>    2) incorporate the session handler included with ADOdb
>
>I immediately like #2 as it provides instant gratification, but I also
>dislike having Mambo's core functionality to depend too much on
>external libraries. So it will definitely happen in the 4.6 release,
>but I cannot promise at this point whether it will be homegrown or
>from an existing library.
>
>Also, using database-backed sessions means easy support for
>high-traffic sites that have multiple apaches in front of a clustered
>mysql backend. So the klunky solution at the moment still has merit
>:-)
>
>Your pains however, Hans, have been heard!
>
>--
>Mitch Pirtle
>Mambo Core Developer
>_______________________________________________
>New to Mambo? Get a great start here:
>http://forum.mamboserver.com/showthread.php?tB100
>
>New York PHP SIG: Mambo Mailing List
>AMP Technology
>Supporting Apache, MySQL, PHP & Mambo!
>http://lists.nyphp.org/mailman/listinfo/mambo
>http://www.nyphp.org
>
>
>
>  
>



More information about the Joomla mailing list