30

I upload an excel file with 1000 rows, by default I have just 2 min in execution time, with that time I can upload 400 records. I get this error Maximum execution time of 120 seconds exceeded

How i can modify this period in yii2 framework ?

Malki Mohamed
  • 1,578
  • 2
  • 23
  • 40

1 Answers1

64

You need to change that in the php.ini:

max_execution_time = 500

or in your php script:

set_time_limit(500); // 
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107
  • could you tell me where in yii2 advanced template php.ini file? thanks. – cruim Jan 25 '17 at 19:13
  • @cruim php.ini is not in yii2 templatee .. but in php configuration file ..normally is in the dir where is stored the php code (depend by OS) .. the best way for find php.ini is run . or you can add to your php code ini_set('max_execution_time', 300); //300 seconds = 5 minutes – ScaisEdge Jan 25 '17 at 19:15
  • I have a problem with download excel file from site. You mean 'add to script' like that ` – cruim Jan 26 '17 at 10:23
  • @cruim post a new proper question for what you need and eventually comment me the link .. (answer in comment is not easy) .. – ScaisEdge Jan 26 '17 at 10:58
  • Add `set_time_limit(500);` in php script, e.g. `/config/main-local.php` – Mike S Dec 09 '22 at 07:49