Does any one knows a hosting that allows long time PHP script execution?

Discussion in 'PHP' started by nikomaster, Jul 26, 2009.

  1. #1
    I am building a web application that requires long time script execution, does anyone knows where to find a hosting service allowing this?
     
    nikomaster, Jul 26, 2009 IP
  2. Chikey.ru

    Chikey.ru Peon

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    see in control panel of hosting in settings of PHP.
    or using in begin of script set_time_limit ( int $seconds )
     
    Chikey.ru, Jul 26, 2009 IP
  3. deeps.chennai

    deeps.chennai Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    use
    set_time_limit(0);
    at the top of the scripts - the page will never timeout
     
    deeps.chennai, Jul 26, 2009 IP
  4. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #4
    How long are we talking? If it's more than several minutes, I don't know any host short of a dedicated server that even wants you on their box.
     
    kblessinggr, Jul 26, 2009 IP
  5. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #5
    You could most likely get a semi-dedicated, or a VPS and set whatever time limit you want. As stated above, there's probably not many shared hosts that would allow longer than 30 seconds or so.

    Most hosts will hard code the limits so that you cannot overwrite them via set_time_limit or through htaccess.
     
    jestep, Jul 26, 2009 IP
  6. mioot

    mioot Peon

    Messages:
    169
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You can have your own script execution time , if it is VPS or dedicated server .
     
    mioot, Jul 27, 2009 IP
  7. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Course even with my own dedicated server (I have two), I would find a way to make the code more robust rather than trying to just simply extend the time limit. Perhaps mainly because I write code that gets distributed to machines I may have no control over.
     
    kblessinggr, Jul 27, 2009 IP
  8. nikomaster

    nikomaster Member

    Messages:
    606
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    30
    #8
    I have my own server in my computer, however I can not use it as internet server. I setup the time execution to 3600 seconds. The time of execution of the script varies.
     
    nikomaster, Jul 27, 2009 IP
  9. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Well technically you can use it as an internet server if you set up with dynip or another dynamic ip type of service (basically like a nameserver that points a domain or subdomain to your computer, and you use a client to update it if your IP changes). But the connection speed in live production would suck.

    My advice though, take it or leave it: worry less about trying to increase the execution time, and more about finding out why it's taking so long in the first place.
     
    kblessinggr, Aug 12, 2009 IP