Help! MySQL error

Discussion in 'MySQL' started by Devana, Jun 15, 2008.

  1. #1
    I got a complain today about an error one of my users received on my forum (it's a SMF-forum).

    The error was: Database Error: MySQL server has gone away
    File: /home2/expenses/public_html/Sources/Security.php
    Line: 280

    and it showed up several times and he had to refresh over and over again to get it to work.

    Can someone help me?

    The code in the requested file is:
    AND (" . implode(' OR ', $ban_query) . ')', __FILE__, __LINE__);
    PHP:
    I haven't done anything to it before.
     
    Devana, Jun 15, 2008 IP
  2. Marineguyfla

    Marineguyfla Peon

    Messages:
    34
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you show your whole code? Except edit out your DB connection variables.
    It's hard to find the problem if I dont have the whole code.
     
    Marineguyfla, Jun 15, 2008 IP
  3. nyxano

    nyxano Peon

    Messages:
    417
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Your error message is "MySQL Server has Gone Away" which means that your programming code is loosing the connection to the database before the query has been completed.

    The most common reason for the MySQL server has gone away error is that the server timed out and closed the connection.

    You can Google the error message or check out this link from the MySQL site:
    http://dev.mysql.com/doc/refman/5.0/en/gone-away.html
     
    nyxano, Jun 15, 2008 IP
  4. Devana

    Devana Well-Known Member

    Messages:
    987
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    130
    #4
    Thanks! :) I think you found the problem ;) I'll check it out and make some changes.
     
    Devana, Jun 15, 2008 IP