Results 1 to 4 of 4

Thread: MySQL server has gone away

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    what was that again?
    Posts
    5

    MySQL server has gone away

    Hi,

    I am developing a web application using Mysql, Apache and PHP and i sometimes get this message "MySQL server has gone away" whenever i call a scripted page.

    This is what i am doing in my scripts:

    - To make the database connection in any one scripted page i use the command "mysql_pconnect()".
    - For the subsequent commands that access the database (within the same scripted page), i don't connect to the database again because i assume the first command (mysql_pconnect()) gives me a permanent connection.

    What am i not doing right?

    Or is it a bug in either Apache, PHP or MySQL?
    Realising that you don't know is the first step to knowing

  2. #2

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    what was that again?
    Posts
    5
    Sometimes i get this error whenever i am accessing the page for the first time; meaning that the connection should have been made by the pconnect().

    This is the structure of my pages:

    - authenticate user using username and password stored in a mysql server.
    - Then execute any other queries there may be.

    Now the funny thing is that when a page is just called, it returns an error message saying that the MySQL server has gone away, when i expect it to be around.

    But i will try to use connect() and see how it works out.
    Realising that you don't know is the first step to knowing

  3. #3
    scoutt
    Guest
    this will explain it better

    http://www.mysql.com/doc/G/o/Gone_away.html

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    what was that again?
    Posts
    5

    Smile

    Thankx

    The link helped a lot.

    I will go in and seek that mysql_close() statement.
    Realising that you don't know is the first step to knowing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width