Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2011
    Posts
    26
    Plugin Contributions
    0

    help question Passing variables without $_SESSION

    Hi, all,

    I'm having some trouble doing something with my zc 1.3.9 site.

    I won't get into the exact specifics, but I am basically trying to set a variable from one php file that is not part of ZC so that it can be checked from html_header.php in the common templates, where I've added code to look for it.

    The problem seems to be that my attempts to use a (new, unique) session variable for this ($_SESSION['blah'] = true) are interfering with ZC's use of $_SESSION. The variable I'm creating is getting 'cleaned' and is no longer a member of $_SESSION by the time ZC's index.php finishes loading.


    So where can I put a global so that ZC will leave it alone? I think the application start module called from index.php cleans out $_SESSION, $_GET and $_POST

    TIA,
    Fred

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Passing variables without $_SESSION

    Your specifics would be helpful if you want more specific help.

    In the interest of security, Zen Cart starts its own session, so whatever session variables you set before Zen Cart code runs, are not visible to Zen Cart, nor vice-versa.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v153 Sharing PHP variables ($_SESSION question)
    By flyvholm in forum General Questions
    Replies: 5
    Last Post: 4 Nov 2014, 06:15 PM
  2. setting $_SESSION variables in an Observer Class
    By tcarden in forum Contribution-Writing Guidelines
    Replies: 1
    Last Post: 13 Feb 2013, 06:37 AM
  3. Replies: 1
    Last Post: 21 Apr 2010, 06:37 PM
  4. where are $_SESSION variables set in order process
    By apathy in forum General Questions
    Replies: 0
    Last Post: 30 May 2008, 01:58 AM
  5. Passing Variables to ZC
    By Gart in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 13 Aug 2006, 08:02 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