0

I've got a couple of settings that I need to temporarily change to run a large script.

This is a one time deal for importing a large amount of data from an excel document into a mysql database on a dedicated server.

By setting the following settings, how long do they last? Do I need to reset them after the process has completed? If so, what do the defaults need to be?

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

set_time_limit(0);
KDJ
  • 292
  • 1
  • 15

3 Answers3

2

Sets the value of the given configuration option. The configuration option will keep this new value during the script's execution, and will be restored at the script's ending.

source

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
0

From the documentation:

Sets the value of the given configuration option. The configuration option will keep this new value during the script's execution, and will be restored at the script's ending.

They're only changed while your script is running, and within the context of your script.

Brad
  • 159,648
  • 54
  • 349
  • 530
0

Please read the PHP docs.

PHP Manual

Sets the value of the given configuration option. The configuration option will keep this new value during the script's execution, and will be restored at the script's ending.

Ivaylo
  • 467
  • 6
  • 19