« Previous Next »

Thread: force sessions to database in php.ini?

Last post 05-31-2008 1:24 PM by mindaugas. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 05-28-2008, 7:54 PM

    • mindaugas
    • Top 500 Contributor
    • Joined on 04-23-2005, 3:05 AM
    • Denver, CO
    • Posts 13

    force sessions to database in php.ini?

    Is there a way in the php.ini file to force all sessions to be stored in a database? For example, in ColdFusion you can configure sessions to be stored in a db. Can you do this in PHP? Thereby forcing all sessions no matter what the customer specifies to be stored in a db.

    More robots less humans
  • 05-31-2008, 1:12 PM In reply to

    Re: force sessions to database in php.ini?

    Yes, I should think so. I've never tried it, but have a look at session.save_handler .

    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
  • 05-31-2008, 1:24 PM In reply to

    • mindaugas
    • Top 500 Contributor
    • Joined on 04-23-2005, 3:05 AM
    • Denver, CO
    • Posts 13

    Re: force sessions to database in php.ini?

    Ya, I've looked at that and I'm not a dev, but it looks like the user would have to code that into their app. I'm looking for a way that we force those who don't save sessions in db to do so thru the php.ini. I think the way we have it now with files would work though to keep sessions persistent in a clustered environment. Since the storage is constant where the sessions would be saved.  

    More robots less humans
Page 1 of 1 (3 items)
Microsoft Communities