NYCPHP Meetup

NYPHP.org

[nycphp-talk] $_SESSION, Logout, and Shared Host

Ben Sgro ben at projectskyline.com
Wed Nov 4 21:38:16 EST 2009


Hello,

I'm pretty sure you can control the /tmp/ directory where the sessions 
are stored. Just change it to be relative for each application.
http://www.php.net/manual/en/function.session-save-path.php

- Ben

Christopher R. Merlo wrote:
> On Wed, Nov 4, 2009 at 8:16 PM, Tim Lieberman <tim_lists at o2group.com 
> <mailto:tim_lists at o2group.com>> wrote:
>
>     It sounds like both applications are running on the same domain.
>      If that's not the case, something else is going on.
>
>
> They are running on the same domain.
>  
>
>     You have a couple of options, none of which might make you happy.
>
>     1) In your app, use a custom session name
>     (session_name('MYSESSID') before you call session_start()).
>
>
> Judging from the errors I got, it seems like I may have to do that 
> before *every* call to session_start(), which is Big Oh of the amount 
> of work in adding a layer to $_SESSION.
>  
>
>     This should work nicely, unless you need to share session data
>     with your colleage's appication.
>
>
> No, we need to not share data with each other -- if you're submitting 
> assignments in ITE 101, you don't want to accidentally overwrite what 
> you already submitted for CSC 101, for example.
>  
>
>     However, a global find/replace to replace $_SESSION with
>     $_SESSION['someKey'] will probably do the trick, and not be too
>     painful.
>
>
> Yeah, I can do that with find, xargs, and sed.  Thanks for the advice.
> -c
> ------------------------------------------------------------------------
>
> _______________________________________________
> New York PHP Users Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> http://www.nyphp.org/Show-Participation



More information about the talk mailing list