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 4021684
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:22:55+00:00 2026-05-20T10:22:55+00:00

I had to change the blueprint of my webapplication to decrease loading time (http://stackoverflow.com/questions/5096127/best-way-to-scale-data-decrease-loading-time-make-my-webhost-happy).

  • 0

I had to change the blueprint of my webapplication to decrease loading time (http://stackoverflow.com/questions/5096127/best-way-to-scale-data-decrease-loading-time-make-my-webhost-happy).

This change of blueprint implies that the data of my application has to be migrated to this new blueprint (otherwise my app won’t work). To migrate all my MySQL records (thousands of records), I wrote a PHP/MySQL script.

Opening this script in my browser doesn’t work. I’ve set the time limit of the script to 0 for unlimited loading time, but after a few minutes the script stops loading. A cronjob is also not really an option: 1) strange enough it doesn’t load, but the biggest problem: 2) I’m afraid this is going to cost too much resources of my shared server.

Do you know a fast and efficient way to migrate all my MySQL records, using this PHP/MySQL script?

  • 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-05-20T10:22:56+00:00Added an answer on May 20, 2026 at 10:22 am

    I solved the problem!

    Yes, it will take a lot of time, yes, it will cause an increase in server load, but it just needs to be done. I use the errorlog to check for errors while migrating.

    How?

    1) I added ignore_user_abort(true); and set_time_limit(0); to make sure the scripts keeps running on te server (stops when the while() loop is completed).

    2) Within the while() loop, I added some code to be able to stop the migration script by creating a small textfile called stop.txt:

        if(file_exists(dirname(__FILE__)."/stop.txt")) {
        error_log('Migration Stopped By User ('.date("d-m-Y H:i:s",time()).')');
        break;
    }
    

    3) Migration errors and duplicates are logged into my errorlog:

    error_log('Migration Fail => UID: '.$uid.' - '.$email.' ('.date("d-m-Y H:i:s",time()).')');
    

    4) Once migration is completed (using mail()), I receive an email with the result of migration, so I don’t have to check this manually.

    This might not be the best solution, but it’s a good solution to work with!

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

Sidebar

Related Questions

Lately I had to change some code on older systems where not all of
I installed Mono on my iMac last night and I immidiately had a change
I'm really asking this by proxy, another team at work has had a change
What are some strategies that people have had success with for maintaining a change
Had an interesting discussion with some colleagues about the best scheduling strategies for realtime
I had to change on my lines of code around. I before had something
I had to change the SQL stored procedure to ORacle stored procddure.I am able
I had to change a ListView webpart and noticed the syntax that renders the
I recently had to change my development to another PC. I installed TortoiseSVN because
I recently had to change my active directory account password. Ever since then I

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.