Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8270967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:43:43+00:00 2026-06-08T06:43:43+00:00

I know this question has been asked numerous times but I’ve tried everything. I

  • 0

I know this question has been asked numerous times but I’ve tried everything.

I have a PHP script that iterates through thousands of images, performs resizing if necessary and then inserts into the database.

I’m getting this error message:

Warning: mysql_query() [function.mysql-query]: MySQL server has gone
away in C:\Utilities\server\htdocs\newGen\index.php on line 105

Warning: mysql_query() [function.mysql-query]: Error reading result
set’s header in C:\Utilities\server\htdocs\newGen\index.php on line
105

I’m using Xampplite and so some parts of the php.ini are missing that others have used to solve the problem because they’re not using the lite version.

I’m certain the problem is not timeouts. While the script will run for several minutes it skips over images that have already been processed and so I quickly get the error message within about 10 seconds. Maybe this has something to do with max table size? I can’t find anything in my php.ini that controls this.

All help is greatly appreciated, I’ve been going at this for hours now.

EDIT:

Here is the code at the 105 mark, it’s the query:

        // Add tNail and image to db
        mysql_query("INSERT INTO gallery values('','$hash','$thumbBlob','$imageBlob','$type','','0','0.0')");
    //  $q->execute();
        print "Successfully processed $fileName<br>";

As you can see by the comments I tried PDO with this and got the same error, foolishly I thought going back to mysql_ commands would help.

If it’s of any help the script complains at the same image every time, yet each image is only ever a few tens of kilobytes and a couple hundred at the most.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:43:44+00:00Added an answer on June 8, 2026 at 6:43 am

    Check the value of “max_allowed_packet” in your my.cnf MySQL config file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this question has been asked numerous times but I couldn't find a
I know this question has been asked many times before but I tried out
I know this question has been asked a few other times but I have
I know this question has been asked before, but I have tried the given
I know this question has been asked before numorous times but they seem to
I know this question has been asked a zillion times, but I still feel
I know this question has been asked countless of times. But none of them
Yes, I know this question has been asked a lot of times, but I
I know this question has been asked numerous number of times, both here and
I know this question has been asked several times, but I can't quite seem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.