0

Am executing PHP script to migrate tables from one server DB to another server DB.

The script unnecessarily stops execution during large no. of INSERT command is executed. eg:transfer 15000rows to a table using mysqli_query("INSERT INTo....VALUES(....)") then execution stops.

already initialized: set_time_limit(0); ini_set('mysql.connect_timeout', '0'); ini_set('max_execution_time', '0');

Is there any other solutions available?

5
  • is there any error output ? Commented Feb 19, 2015 at 10:49
  • no nothing displayed on screen Commented Feb 19, 2015 at 11:00
  • Is it possible to split your query into multiple queries, where the queries would insert smaller amount of rows? Commented Feb 20, 2015 at 10:06
  • @PetrNovak , it's a good comment, but unfortunately i already tried this. Actually the exact problem arrives when the large no. of rows table operates. One more thing is that the particular table is successfully completed insertion, the error occurs with the next table's. Commented Feb 20, 2015 at 11:05
  • Can you then split one script into multiple scripts (let's say one script per table), so the script won't timeout? Commented Feb 20, 2015 at 11:14

2 Answers 2

1

I know it's been a while since you asked the question, but I am having a similar problem and I just solved it by using:

http://php.net/manual/en/function.set-time-limit.php

As long as you are not running your script in safe mode, though. Otherwise, you will have to change the time limit in php.ini.

Hope this helps to someone else with the same problem.

Sign up to request clarification or add additional context in comments.

Comments

0

Please Declare

ini_set('max_execution_time', '-1');

2 Comments

is it really a solution?
Yes.. you will try this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.