WordPress.org

Forums

Using PHP Sessions in WP 2.3 (3 posts)

  1. toomzee
    Member
    Posted 7 years ago #

    I have a beautiful shopping cart that I wrote in PHP/MySQL and I want to integrate it into my WP site, but my sessions keep getting reset to NULL. Does anyone know why this is and what can be done to allow my sessions to run in WP? As I understand it, WP uses cookies but does not touch the session arrays at all, so why does it keep resetting my $PHPSESSID value to NULL?

    On my main home page above the header call I have:

    <?
    session_start();
    ?>

    and then on my shopping cart pages, above he header call, I have:

    <?php
    if (!$PHPSESSID)
    {
    header("Location: index.php");
    exit;
    }
    session_start();
    ?>

    So, what's the deal?

  2. delirium
    Member
    Posted 7 years ago #

    The deal seems to be that no one in WP wants to resolve this issue for a pile of people who need sessions to work throughout WP. I have to say, I even resorted to using a different blog platform because of this.

    I haven't found anything to help solve this yet.

  3. Anonymous
    Unregistered
    Posted 7 years ago #

    I have the same issue!!!!!!!!!!it's frustrating to put this much time into the site design only to find out that you can't use sessions?

Topic Closed

This topic has been closed to new replies.

About this Topic