FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » database-based sessions for 3rd party php app
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: database-based sessions for 3rd party php app [message #179025 is a reply to message #179021] Wed, 05 September 2012 12:51 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
Axel wrote:
> Am Mittwoch, 5. September 2012 14:11:11 UTC+2 schrieb Jerry Stuckle:
>
>> You can set session.save_handler in the php.ini file to point at a
>> different handler. Define your handler and write the data to the
>> database. Instructions are in the PHP doc.
>
> really? I found just a bunch of stuff describing the general principle. I'll have another look, thanks.
>

Remember you still have to write the handler and make sure its included
in your app.

>> Alternatively, you can also set an auto prepend file to include your
>> session handler code in every file.
>
> ah! That's kind of what I had in mind :) . I didn't know that - I'm not a php developer.
>
That has some performance downsides on scripts that dont need it.

>> However, are you sure this will help performance? Why do you think your
>> current session handling is causing performance problems? Not that I
>> like using NFS shares, but they're typically faster than remote databases.
>
> Hm. That's a good question. _Right Now_ we have 57000 active sessions, and a "dir" on the directory with them takes 20+ seconds. Also the NFS serves most of our content, so bottom line - I have no clue, but I think this might improve performance - which is kind of neccessary. So basically I wanted to change and have a look.
>
Hmm. yes. at that level a database with appropriate indexing should be
faster than a file system

>
> thanks for your help!
> Axel.
>
>


--
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to
lead are elected by the least capable of producing, and where the
members of society least likely to sustain themselves or succeed, are
rewarded with goods and services paid for by the confiscated wealth of a
diminishing number of producers.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Net Connect API -php
Next Topic: Php
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 14:19:03 GMT 2024

Total time taken to generate the page: 0.04247 seconds