Bluehost.com Web Hosting $6.95

Re: [PHP] Custom Session usind MySQL

This is a discussion on Re: [PHP] Custom Session usind MySQL within the PHP General forums, part of the PHP Programming Forums category; Manisha Sathe wrote: > I want the session to be accessed from different websites, so i got the > answer ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-19-2003
Marek Kilimajer
 
Posts: n/a
Default Re: [PHP] Custom Session usind MySQL

Manisha Sathe wrote:
> I want the session to be accessed from different websites, so i got the
> answer in this forum only to make use of customised session with mysql.
>
> I searched the web and came to know that 'session.save_handler' of php.ini
> needs to be as 'user' but instead, on my server it is 'files'. As server is
> a shared server so i may not be able to change it, what can i do to resolve
> this ?
>
> Thanks in advance
> Manisha
>


You have to use session_set_save_handler() to register your session
handling functions. One thing I would point out is that you need to lock
the session storage, in this case one row in a table. As mysql cannot
lock a row, only whole table, I would sugest you use GET_LOCK and
RELEASE_LOCK mysql functions (with session id as the lock name) to
implement session locking.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:20 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0