Tuesday, July 28, 2009

Making sessions in apache using perl and mysql?

Im trying to make sessions for users so that when a user logs in he gets a session key which follows him through while he is logged in and be able to use my web page. Any ideas on how i can do this? sessions in apache?

Making sessions in apache using perl and mysql?
Try the CGI::Session module?
Reply:Use a cookie, perhaps... You could create a GUID, put it in a cookie and at the same time put that guid in a file (or AS a file name)... You could then check the cookie against your list in your file. You can set your cookie to expire to limit how much time they have in a session. You could use perl to erase the guid file after a certain amount of time (thus, expiring the guid on both ends)...





I'm pretty new to perl, mysql and apache; but not new to programming... This is how I would do it with my limited knowledge.


No comments:

Post a Comment