top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How is it possible to set an infinite execution time for PHP script?

+2 votes
335 views
How is it possible to set an infinite execution time for PHP script?
posted Oct 5, 2014 by Vrije Mani Upadhyay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer

Edit in php.ini file increase the time seconds-
ini_set('max_execution_time', 300); //300 seconds = 5 minutes

answer Oct 8, 2014 by Deepak Negi
Similar Questions
0 votes

I am running a python script and it will create a file name like filename0.0.0 and If I run it again then new file will create one more like filename0.0.1......
my code is-

i = 0
for i in range(1000):
 try:
 with open('filename%d.%d.%d.json'%(0,0,i,)): pass
 continue
 except IOError:
 dataFile = file('filename%d.%d.%d.json'%(0,0,i,), 'a+')
 break

But It will take more time after creating many files, So i want to store value of last var "i" in a variable so that when I run my script again then I can use it. for example-
my last created file is filename0.0.27 then it should store 27 in a variable and when i run again then new file should be created 0.0.28 according to last value "27", so that i could save time and it can create file fast..

+4 votes

I have a stringent requirement to configure a router at run time to change the route of data for set of IPs automatically not human intervention. And if it is possible then how much time it will take since there is a time constraint for the Data plane.

...