"Session expired, please enter username and password again" problem

Discussion in 'Installation' started by tfrangio, Aug 23, 2008.

  1. tfrangio

    tfrangio New Member

    Joined:
    Aug 23, 2008
    Messages:
    11
    Hi All,
    I have search the posts about this issue and found it mentioned but no solution to the problem. If I missed the fix I apologize upfront.:eek:

    After buying and installing the application and registering as a new member, whenever I tried to login as a user, I get the following error and it does not allow me to go to member control panel. I get the following message:

    "Session expired, please enter username and password again"

    Shouldn't the correct functionaltity be for me to be directed to the protected content area after I log in?

    I have played around with this and the Admin interface works fine it is just the user accounts that are having trouble.

    How do I fix this? Thanks in advance.
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    You should be getting into the members area after signing up / logging in.
    Are the /data/ directory and subdirectories chmoded 777?

    It may be something to do with your host as well, who are you using?


    David
  3. tfrangio

    tfrangio New Member

    Joined:
    Aug 23, 2008
    Messages:
    11
    All the directories are wide open with 777 and I am using Host Excellence. I saw that other people had similar issues so I think it must be a configuration issue.
    Or at least that is what I am hoping:D
  4. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    Couple of things come to mind as possible causes:

    1) are you switching between www.yourdomain.com and yourdomain.com?
    2) multiple "session starts" in your page(s)
    3) a third party app you are integrating with that is conflicting with your session state

    If not 1 & 2, what 3rd party apps (if any?) are you integrating with?

    Also, are you seeing this in IE (6 / 7?), FF (2 / 3?). Have you tried it in another browser than your default to ensure you are not seeing any cookie handling weirdness?
  5. tfrangio

    tfrangio New Member

    Joined:
    Aug 23, 2008
    Messages:
    11
    Great Questions. I have only tested it with IE 7.0.5730.13. I am going to try it with FireFox in a min. I have Wordpress intalled on that same domain so maybe it is conflicting. I will check by installing onto a different domain.
  6. tfrangio

    tfrangio New Member

    Joined:
    Aug 23, 2008
    Messages:
    11
    I have tested with Firefox 3.0.1 and I have the same problem. I tried to install onto a test domain where I do not have Wordpress installed but the aMember license will not allow me to do it. I can not remove Wordpress from this domain. I have aMember installed in a subdirectory "www.BayStateAcademy.org/aMember" does anyone think that this subdirectory install has anything to do with my problem?
  7. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    The subdirectory should not have anything to do with it.

    Some things I noticed.

    1. Use of multiple caps. Some places aMember, some places amember. Not sure if your host is picky about that, but something to standardize.

    2. I did not get a session error but rather a directory listing denied after log in (tried to take me to http://www.baystateacademy.org/amember/PreLicense/)

    3. When I went to http://www.baystateacademy.org/amember/member.php it loaded just fine without prompting me to relogin.

    4. Tried going to home page, browsing around and then going back to http://www.baystateacademy.org/amember/PreLicense/member.php with no problem.

    Using FF 3.01 and IE 7.0.6
  8. tfrangio

    tfrangio New Member

    Joined:
    Aug 23, 2008
    Messages:
    11
    Thanks for the suggestions. A couple of things I am now wondering about. I have installed the demo version on another hosting account that uses a Linux server instead of Windows. The demo seems to be working fine. baystateacademy.org is on a windows box. Is that my problem? I checked the server before install with the tester.php script and it said that no further installs need to be made. Does the tester.php script check for the OS and Apache installs.

    Here are my response to your suggestions:

    1. Use of multiple caps. Some places aMember, some places amember. Not sure if your host is picky about that, but something to standardize.
    No problem on my server I checked it out.

    2. I did not get a session error but rather a directory listing denied after log in (tried to take me to http://www.baystateacademy.org/amember/PreLicense/)
    There is no index.html file in the directory yet so there is nothing there to see. However, I think the correct functionality should have been to prompt you with a username and password.

    3. When I went to http://www.baystateacademy.org/amember/member.php it loaded just fine without prompting me to relogin.

    I have never had an problem with the login loading only getting sent to the correct profile page after login is when I got the Session expired notice.

    4. Tried going to home page, browsing around and then going back to http://www.baystateacademy.org/amemb...nse/member.php with no problem.
    I do not understand what you are suggesting here there is no such URL?

    Using FF 3.01 and IE 7.0.6 - I have found not diff between FF and IE.
  9. david_cu

    david_cu New Member

    Joined:
    Aug 22, 2006
    Messages:
    3
    any answers

    did you ever solve this problem - Im having it now after upgrading to the latest version

    Thanks
    dave
  10. jbround39

    jbround39 aMember Pro Customer

    Joined:
    Mar 20, 2008
    Messages:
    61
    Here's a solution I found when I was having this problem. In the login form html, there is a hidden field like this:

    <input type="hidden" name="login_attempt_id" value="THIS MUST BE THE SERVER TIME" />

    Obviously it doesn't say "this must be the server time", it's got some code for it.

    In my coding, I had messed up the coding of the value by just cutting and pasting blindly. If it isn't assigned correctly, it will cause this error when you attempt to log in after logging out.

    If this is in html, you can assign this by replacing the phrase inside the quotes with:

    <input type="hidden" name="login_attempt_id" value="<?php print time(); ?>" />

    If this is within an echo or print statement within php, make sure it DOESN't say <?php.... within the value. It would just need to be something like this:

    if your echo statement is using " ":

    <input type=\"hidden\" name=\"login_attempt_id\" value=\"".time()."\" />

    if your print or echo statement is using ' ':

    <input type="hidden" name="login_attempt_id" value="'.time().'" />

    I hope that helps at least someone.
  11. scott_wa1

    scott_wa1 aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    62
    I know this is an old thread but I want to thank jbround39 for his last post here. I was having the same issue and found that the default code is set to use the smarty code to initiate php {php} and that was the cause! It's working great now.

Share This Page