Viewing 6 replies - 1 through 6 (of 6 total)
  • How have you confirmed that it is WordPress that is doing this? Could it be an issue with PHP and your server?

    Thread Starter 1stpixel

    (@1stpixel)

    I’m using WAMP Server, only for testing purposes, and heve never ever before encountered such issue. it won’t work only in my WP installation.

    All i use is a $_SESSION[‘test’] = “foo”;
    and on any other page where i echo it it is gone.

    There are some post about $_SESSION kills here, but they never got an answer.

    hopefully this is not the case withthis one.

    Hmm…well, then we will hope that a coder or two will pop by and see if they can shed any light on the subject.

    Has anyone had any luck with this since the last post?

    I’ve noticed that if I point my browser directly at a page’s template.php file vs. accessing the page through mod_rewrite, the session is set.

    So, if I do https://mysite/mypage, the session is not set. But, if I try to access the template file being used by mypage, e.g. https://mysite/wp-content/themes/mysite/mytemplate.php, the session is set.

    That leads me to believe that somewhere in between making the page request and getting redirected silently to the template file for the page, WP or mod_rewrite or Apache is inserting some content or thwarting the session_start().

    Can anyone confirm? Or know what the issue is?

    any answer on this? i’m seeing the same thing.

    i confirm this. $_SESSION doesnt work so good in wp. you need to add session_start everywhere within the templates/script.. its just crap ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘$_SESSION’ is closed to new replies.