1

Currently I have a PHP script that inserts about 2000+ rows into the mysql database.

But for my case it stops after 500+ rows. Any idea what could be the issue?

I have verified by also displaying out the data before insertion and it shows all the 2000+ rows of data.

Came across this posting MySQL insert limit? but I am currently using MySQL in Windows.

How could I remove the limit?

2
  • 2
    Your page seems getting time out.Try adding set_time_limit(0); in your code. Commented Mar 18, 2013 at 10:02
  • can you show us the query Commented Mar 18, 2013 at 10:03

3 Answers 3

5

This happens because of the time limit exceeding 30 sec.... To overcome this , you can follow either the following steps

1. Use this code 
 set_time_limit(0);
 in your php before inserting into db

or

2. Change the time limit in your php.ini file ...

1 option is better and temperory measure though

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

Comments

0

Open Php.ini and go to line no. 442. You will get following line

  max_execution_time = 30

set max_execution_time to "0" which is means no limit or set other value in seconds

Comments

0

You can put this PHP code before inserting into the database

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

Comments

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.