1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

wordpress question

Discussion in 'PHP' started by plussy, Sep 20, 2012.

  1. #1
    I have a wordpress site and when I am logged in as admin if I click on a link IE the home button I appear as logged in ( can see the admin bar at the top) and if I click again I am logged out ( no admin bar) and if I click again I am logged in again and so on and so on. Anyone got any idea where to start looking what the problem is?
     
    plussy, Sep 20, 2012 IP
  2. SitesTen

    SitesTen Active Member

    Messages:
    47
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    75
    #2
    Can you post a link to your web site?
     
    SitesTen, Sep 20, 2012 IP
  3. cyber123

    cyber123 Banned

    Messages:
    63
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    did't get your actual problem?
     
    cyber123, Sep 20, 2012 IP
  4. plussy

    plussy Peon

    Messages:
    152
    Likes Received:
    5
    Best Answers:
    9
    Trophy Points:
    0
    #4
    Sorry can't as it is on localhost at the moment.

    The actual problem is that I should always be signed in. not only every other time when I click on a link.
     
    plussy, Sep 20, 2012 IP
  5. SitesTen

    SitesTen Active Member

    Messages:
    47
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    75
    #5
    Did you tried it in another web browser?
     
    SitesTen, Sep 20, 2012 IP
  6. plussy

    plussy Peon

    Messages:
    152
    Likes Received:
    5
    Best Answers:
    9
    Trophy Points:
    0
    #6
    yeah similar effect. just switches between logged in and logged out every 2 or 3 clicks instead of every click
     
    plussy, Sep 20, 2012 IP
  7. SitesTen

    SitesTen Active Member

    Messages:
    47
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    75
    #7
    I have no actual idea. Any customizations you made or plugins used after the initial installation of wordpress?
     
    SitesTen, Sep 20, 2012 IP
  8. plussy

    plussy Peon

    Messages:
    152
    Likes Received:
    5
    Best Answers:
    9
    Trophy Points:
    0
    #8
    let me have a look at the setup. I actually haven't set it up. someone else has and I am just trying to figure out what is going on.
     
    plussy, Sep 20, 2012 IP
  9. plussy

    plussy Peon

    Messages:
    152
    Likes Received:
    5
    Best Answers:
    9
    Trophy Points:
    0
    #9
    ok this is what I have just been told.

    The set up is as follows

    There are 3 different sites ( but all look identical from the design that's why I didn't realise it at first ).

    There are 2 wordpress sites and 1 forum (SMF).

    the hierarchy is

    1 wordpress in root
    1 wordpress in root/subfolder
    SMF in root/subfolder

    The problem is only occurring on the wordpress installed in the subfolder. the one in root is fine.

    Now the login is done via the SMF login which sends a request via xml-rpc to both wordpress sites to get their cookies to get signed in.

    I compared what cookies are set in the logged out and logged in state and they are identical.

    lol this setup is so confusing lol.
     
    plussy, Sep 20, 2012 IP
  10. SitesTen

    SitesTen Active Member

    Messages:
    47
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    75
    #10
    So there is kind of a bridge between the forum software and SMF. The bridge for some reason is not working properly. Check what is the name of the bridge used and its configuration. There is a chance that the cookies are set for the main domain folder / but not for the /subfolder.
     
    SitesTen, Sep 20, 2012 IP
  11. plussy

    plussy Peon

    Messages:
    152
    Likes Received:
    5
    Best Answers:
    9
    Trophy Points:
    0
    #11
    well it sets the cookie because I appear as logged in. only when I go to another page within the wordpress in the subdirectory the logged in status changes all the time.

    as the system is clearly logged in ( because it will then again state that is logged in at a subsequent page view ).
     
    plussy, Sep 20, 2012 IP
  12. alexkboorman

    alexkboorman Peon

    Messages:
    70
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    0
    #12
    that sounds hairy, have you checked to make sure nothing is overwriting the sessions? I'm not familiar with SMF so I probably won't be of considerable help here.
     
    alexkboorman, Sep 23, 2012 IP
  13. plussy

    plussy Peon

    Messages:
    152
    Likes Received:
    5
    Best Answers:
    9
    Trophy Points:
    0
    #13
    SMF only fires a xml-rpc call to the woprdpress api and calls a custom function that will log the user in. After that SMF and Wordpress work independently. Only other connection is the logout script which works similar to the login script.

    I have analysed the cookies and they all seem fine. I first thought that it might be a simple an some other custom code that displays certain links etc. But then I realised that the admin bar at the top of the screen is also always switching between being logged in and not logged in.

    Really don't know what else to look for.
     
    plussy, Sep 24, 2012 IP