ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

firefox problem with losing session data

October 08, 2009 6:29am

Subscribe [2]
  • #1 / Oct 08, 2009 6:29am

    MarcinM

    17 posts

    Hi,

    I’m trying to track from where my users comes (based on $_SERVER[‘HTTP_REFERER’] I mark them as google, direct or other) and then pass this info via $_SESSIONS through all they clicks over the site to the contact form page and send it with email.
    So to do that I did some PHP in my header that’s embed on every page, where I:
    1) start sessions
    2) parse the referer to get my “track_id”
    3) check, if referer is from my site (means user passing my site)
    4) if no -> store “track_id” in my $_SESSION[‘track_id’]
    5) if yes -> do nothing

    That’s all I’m doing there. Then, at my contact form page I read this session data and put it into hidden input.

    All works just perfect beside Firefox - no matter if it’s FF 2, 3, 3.5, on windows, linuks or osx

    After my debugging it looks like in FF the PHP in header is run two times after each click and for the first time $_SERVER[‘HTTP_REFERER’] is empty and the second time it’s my site - like it should be.
    So the problem is, why just Firefox run it two times???
    May it be because of RewriteEngine used to remove index.php? But only in FF? Strange!

    I need your help. please!

  • #2 / Oct 08, 2009 6:54am

    Sue Crocker

    26054 posts

    For debugging purposes, how about renaming your .htaccess file. Does FF work then?

  • #3 / Oct 08, 2009 9:20am

    MarcinM

    17 posts

    Already tried but problem is that if I rename the .htaccess whole site doesn’t work (links are wrong then). So there is no way to test it.

  • #4 / Oct 08, 2009 9:44am

    Sue Crocker

    26054 posts

    Create a new template group just for testing this.

    You’d need to turn off the site temporarily while testing, though.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases