PHP script time out error

Discussion in 'PHP' started by tamilsoft, Jun 27, 2007.

  1. #1
    Hi,

    I am going to execute a php file under command line, that includes large functionality it may take 2 or 3 minutes to complete the task, What is my doubt is while running that file under command line,will script time out error occur?
     
    tamilsoft, Jun 27, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Try:
    
    set_time_limit(0);
    
    PHP:
     
    nico_swd, Jun 28, 2007 IP
  3. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #3
    Increase the max_execution_time variable in php.ini to the required time and you should be ok.

    Peace,
     
    Barti1987, Jun 28, 2007 IP
  4. amorph

    amorph Peon

    Messages:
    200
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I posted a similar thread yesterday. I'm having a big script with many regexes and the script time outs each time. I can't modify my ini since I'm not on localhost. It would be nice if someone would have an idea how to split a big task like this and avoid time outs. I've seen somethin glike this on some software that refreshes at every 3-4 seconds and takes the task from where it was left. Hard to achieve :(
     
    amorph, Jun 28, 2007 IP
  5. tamilsoft

    tamilsoft Banned

    Messages:
    1,155
    Likes Received:
    78
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I think all of you are not getting me, I don't want to run this file on a browser, I just want to run under command line
     
    tamilsoft, Jun 28, 2007 IP