Help: 2 different web apps, by 2 different users, want to use thesame session filename for data.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sugapablo

    Help: 2 different web apps, by 2 different users, want to use thesame session filename for data.

    I have a server where two different users are each running a different
    web application. I installed SugarCRM for one, and Info@Hand (built
    from SugarCRM) for the other. Both are trying to save and access the
    same file in the PHP session_save_pa th (/tmp/
    sess_c2b09aac9b 607b1df05d73c7f 1c4cbb1).

    If I delete that file, the whichever app runs first, saves data under
    that filename and the other will fail. They both keep regenerating
    the same filename. I thought that data stored in the
    session_save_pa th had random filenames?

    How can I fix/get around this?


    --
    Russ Schneider (a.k.a. Sugapablo)

  • Rik Wasmus

    #2
    Re: Help: 2 different web apps, by 2 different users, want to use the same session filename for data.

    On Mon, 21 Apr 2008 20:39:00 +0200, sugapablo <sugapablo@hotm ail.com>
    wrote:
    I have a server where two different users are each running a different
    web application. I installed SugarCRM for one, and Info@Hand (built
    from SugarCRM) for the other. Both are trying to save and access the
    same file in the PHP session_save_pa th (/tmp/
    sess_c2b09aac9b 607b1df05d73c7f 1c4cbb1).
    >
    If I delete that file, the whichever app runs first, saves data under
    that filename and the other will fail. They both keep regenerating
    the same filename. I thought that data stored in the
    session_save_pa th had random filenames?
    Unless a filename is allready 'given' by a session-id in a cookie or
    GET/POST params.
    How can I fix/get around this?
    They shouldn't fail with a session holding the data of both, save for name
    clashes in the variables / arrays. However, it is possible they have
    they're own session_handler (try to search in the code for a
    session_set_sav e_handler(). If so, more info about these handlers is
    needed.

    If not, and they are in different paths, make the session-id dependable on
    the path by setting is explicitly with session_set_coo kie_params().
    --
    Your sig seperator is broken.. It's missing a space after it.
    --
    Rik Wasmus

    Comment

    • =?iso-8859-1?Q?=C1lvaro?= G. Vicario

      #3
      Re: Help: 2 different web apps, by 2 different users, want to use the same session filename for data.

      *** sugapablo escribió/wrote (Mon, 21 Apr 2008 11:39:00 -0700 (PDT)):
      I have a server where two different users are each running a different
      web application. I installed SugarCRM for one, and Info@Hand (built
      from SugarCRM) for the other. Both are trying to save and access the
      same file in the PHP session_save_pa th (/tmp/
      sess_c2b09aac9b 607b1df05d73c7f 1c4cbb1).
      >
      If I delete that file, the whichever app runs first, saves data under
      that filename and the other will fail. They both keep regenerating
      the same filename. I thought that data stored in the
      session_save_pa th had random filenames?
      They generate a random session ID... unless the browser sends a previous
      ID. I'd say you have both apps in different directories of the same site.
      If there's a conflict with session data you can restrict the scope of the
      session ID cookie with this directive:

      session.cookie_ path

      If PHP runs as Apache module you can set it in two .htaccess files, one for
      each app:

      In /home/site/www/app1/.htaccess:

      session.cookie_ path=/app1/

      In /home/site/www/app2/.htaccess:

      session.cookie_ path=/app2/



      More info:



      --
      -- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
      -- Mi sitio sobre programación web: http://bits.demogracia.com
      -- Mi web de humor en cubitos: http://www.demogracia.com
      --

      Comment

      Working...