Results 1 to 10 of 26

Hybrid View

  1. #1
    Join Date
    Apr 2008
    Posts
    31
    Plugin Contributions
    0

    Default Re: My idea for accessing zen cart sessions outside of zen...

    well in the login code it sets $_SESSION

    but if you try accessing one of the var from a script outside the folder zen cart runs in, it does work. Its strange, every application iv ever written i can access my session vars in any folder i wish from any script file i wish

  2. #2
    Join Date
    Apr 2007
    Location
    Herts. UK
    Posts
    890
    Plugin Contributions
    4

    Default Re: My idea for accessing zen cart sessions outside of zen...

    Quote Originally Posted by glenelkins View Post
    well in the login code it sets $_SESSION

    but if you try accessing one of the var from a script outside the folder zen cart runs in, it does work. Its strange, every application iv ever written i can access my session vars in any folder i wish from any script file i wish
    Zen Cart uses a custom session handler to store its session data. You cannot access the session data from $_SESSION until the data has been reloaded by the session handler. You'll need to read up on session_set_save_handler() and review the code in includes/functions/sessions.php .

    Regards,
    Christian.

  3. #3
    Join Date
    Apr 2008
    Posts
    31
    Plugin Contributions
    0

    Default Re: My idea for accessing zen cart sessions outside of zen...

    The _sess_read() function has a value $key that it uses. What is this? And im not sure how this parses the $key value if you look here:

    session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');


    Where in this line does it parse data to the _sess_read function?

 

 

Similar Threads

  1. Using zen cart sessions outside of zen cart
    By rasher in forum General Questions
    Replies: 0
    Last Post: 29 Jul 2009, 08:22 PM
  2. A pretty weird problem while accessing session outside of zen
    By yellow1912 in forum Contribution-Writing Guidelines
    Replies: 2
    Last Post: 1 Jul 2009, 02:44 AM
  3. Use Zen Variables outside Zen Cart
    By renkforce in forum General Questions
    Replies: 0
    Last Post: 4 Mar 2009, 07:12 PM
  4. Zen Cart Idea/Question
    By SOCiETi in forum General Questions
    Replies: 0
    Last Post: 28 Aug 2007, 07:56 PM
  5. Replies: 4
    Last Post: 30 Oct 2006, 12:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg