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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |