Forums

How can I disable session refresh? (3 posts)

  1. jazztpt
    Member
    Posted 1 year ago #

    I would like to use the session vars from the rest of my site for my blog. Users log into my site and have various roles & preferences, and I'd like to access them from my wordpress blog.

    I have the code set up and all my objects and database calls seem to be working well. The only thing that isn't working is that the session appears to refresh each time the blog page is opened, deleting any info I had about the user.

    I didn't find a session_start() in the wordpress code...am I missing it somewhere?

    Most of my site is set up like this:
    myurl.com/index.php = home page
    myurl.com/index.php?SomeOtherTopic = another page

    And the blog is located at:
    myurl.com/blog
    Is this causing the problem?
    Thanks in advance!

  2. jazztpt
    Member
    Posted 1 year ago #

    Anyone have any ideas on this? I'm probably not the only person who wants to do something similar...what have other people done?

    Thanks

  3. syderone
    Member
    Posted 1 year ago #

    I've done this on my webite:

    wp-settings - line 37 :

    change

    $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());

    to

    $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES);

    This worked for me... but I don't know if some new troubles will arrive then :D

Topic Closed

This topic has been closed to new replies.

About this Topic