Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

PHP time limit ?

  • 14-08-2009 1:31pm
    #1
    Registered Users, Registered Users 2 Posts: 8,070 ✭✭✭


    You can set time limit to infinite etc but mine always stops after 5 minutes !


    Test
    [PHP]<?php
    ini_set('max_execution_time', 0);
    set_time_limit(0);

    $FileName = "abc.txt";
    $FileHandle = fopen($FileName, 'w') or die("can't open file");


    $i= 0;


    while($i<100)
    {
    $today = date("g:i a");
    fwrite($FileHandle, $today);
    sleep(60);
    $i++;
    }

    fclose($FileHandle);
    ?>[/PHP]


    Result
    2:21 pm 2:22 pm 2:23 pm 2:24 pm 2:25 pm 2:26 pm


    = 5 minutes !


Comments

  • Registered Users, Registered Users 2 Posts: 3,078 ✭✭✭onemorechance


    Your webserver might force a timeout after 5 mins.


  • Registered Users, Registered Users 2 Posts: 1,452 ✭✭✭tomED


    Your webserver might force a timeout after 5 mins.

    Yeah it's most likely your server making it time out.


  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    IIS has an inbuilt limit of 5 minutes which you can't override. A similar can be (and probably is) set in Apache.


  • Registered Users, Registered Users 2 Posts: 442 ✭✭STBR


    Yeah the default Apache time limit is 300 seconds.

    Which I guess translates to 5 minutes!


Advertisement