SQL Server has Gone Away...But Only For Certain User?

Discussion in 'Installation' started by swintec, Feb 24, 2010.

  1. swintec

    swintec aMember Pro Customer

    Joined:
    Nov 24, 2008
    Messages:
    49
    Hi! I have two installs of Amember that work great. However, today a customer has wirtten in to say that he can not login to his account because of an error he is getting, you can see this below. The funny thing is, I can see that plenty of other users have logged in just fine all afternoon today so it is just him experiencing it. he has tried different browser, different IP address. Several months ago another user had this happen but it went away after awhile and also once he used a different connection. Why would the SQL server not be funtioning correctly for one user but everyone else it works fine? Please see the errors below:

    An Error has occured

    MYSQL ERROR:<br />MySQL server has gone away<br />in query:<br />INSERT INTO amember_access_log (member_id, remote_addr, url, referrer) VALUES (1334, 'his ip here', '/member.php', 'Link to my membership page here')



    Please contact webmaster: ***My Email****


    An Error has occured

    MYSQL ERROR:<br />MySQL server has gone away<br />in query:<br />INSERT INTO amember_error_log (member_id, time, remote_addr, url, referrer, error) VALUES (NULL, NOW(), 'his ip', '/member.php', 'Link to my membership page here', 'MYSQL ERROR:<br />MySQL server has gone away<br />in query:<br />INSERT INTO amember_access_log\n (member_id, remote_addr, url, referrer)\n VALUES\n (1334, \'his ip\', \'/member.php\', \'Link to my membership page here\')\n ')
  2. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    anything special about that particular user? (username, password, etc. have any special characters, etc?)

    If you log on as the user can you reproduce the issue?
  3. swintec

    swintec aMember Pro Customer

    Joined:
    Nov 24, 2008
    Messages:
    49

    I can log in with the users details just fine in both firefox and IE. What else do you think it could be?
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
  5. swintec

    swintec aMember Pro Customer

    Joined:
    Nov 24, 2008
    Messages:
    49
    I have done that fix and will see what the customer says. I see the poster that found it says that certain payment plugins use that...which plugins are they, just so I know if there is a problem.

    Also, why would that part of the code have caused an issue with only one user and no one else?

    Is it possible that maybe his IP address was odd? His address was xx.xx.xx.xx...not enough characters? The user several months ago who had this happen, when he changed connections (different IP address)...it all of a sudden worked. Maybe some IPs take to long to look up and dont return a result?
  6. swintec

    swintec aMember Pro Customer

    Joined:
    Nov 24, 2008
    Messages:
    49
    Just to update, now that I have made the code change, the specific customer can login to his account just fine. I have to wonder why his IP address was causing issue?
  7. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    There are various issues with gethostbyaddr in php. It does not work for some IP or systems, also, it took long time to resolve some IPs. So this will be removed from future releases.

Share This Page