Jump to:

4945 Posts in 17814 Topics by 1494 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » First Time run Dev/build?flush= 1 [Warning] set_time_limit()

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 5119 Views
  • go2planC
    Community Member
    19 Posts

    First Time run Dev/build?flush= 1 [Warning] set_time_limit() Link to this post

    Hi I've had this problem before and i never have worked out what the problem is, I know it's fixable as I have got several site running silverstripe on the same server.

    What happens after I install silverstripe, even if i don't add any of my own custom code i get the following error:

    [Warning] set_time_limit() has been disabled for security reasons
    GET /dev/build

    Line 87 in /home/fhlinux130/t/thisisbubble.co.uk/user/htdocs/sapphire/core/model/DatabaseAdmin.php

    78    }
    81    /**
    82     * Updates the database schema, creating tables & fields as necessary.
    83     */
    84    function build() {
    85       // The default time limit of 30 seconds is normally not enough
    86       if(ini_get("safe_mode") != "1") {
    87          set_time_limit(600);
    88       }
    90       // Get all our classes
    91       ManifestBuilder::create_manifest_file();
    92       require(MANIFEST_FILE);

    any ideas>

    Thanks in advance!

  • OwenW
    Community Member
    45 Posts

    Re: First Time run Dev/build?flush= 1 [Warning] set_time_limit() Link to this post

    HI go2planc,

    you problem here is that the set_time_limit function is disabled within php.ini for some reason.

    If you are running on a hosted server that you don't control, you can talk to your hosting provider and ask them if they will enable set_time_limit.

    If you are hosting the server yourself, then look in the php.ini file for a line like this;

    disable_functions = set_time_limit

    and remove the set_time_limit from the list and run again.

    Other than that you would be able to make changes to DatabaseAdmin.php and remove the set_time_limit call, but there are several other references to the function in other places in silverstripe.

    Out of interest, what version of Silverstripe are you trying to install?


  • go2planC
    Community Member
    19 Posts

    Re: First Time run Dev/build?flush= 1 [Warning] set_time_limit() Link to this post

    Hi Owen,

    Thanks for the reply. I run into the same problem on every version of Silverstripe that I have installed including the latest release. Unfortunatly I have asked my hosting provider if they would be willing to alter settings within the php.ini file before and their response was 'no'.

    However the solution I found all-be-it a bit strange is to run the install script and leave the site for about 5 minutes (just enough time to make a cup of tea) then return and run dev/build again and it works fine. I haven't run into the problem else where either - it is just after the initial install.

    Thank you once again for you help.


  • Matty Balaam
    Community Member
    69 Posts

    Re: First Time run Dev/build?flush= 1 [Warning] set_time_limit() Link to this post

    I've managed to get around this problem on Fasthosts and Silverstripe 2.4 by amending the bottom of sapphire/core/core.php to

    * Increase the time limit of this script. By default, the time will
    be unlimited.
    * @param $timeLimit The time limit in seconds. If omitted, no time
    limit will be set.
    function increase_time_limit_to($timeLimit = null) {
    if(!ini_get('safe_mode')) {
    if(!$timeLimit) {
    } else {
    $currTimeLimit = ini_get('max_execution_time');
    if($currTimeLimit && $currTimeLimit < $timeLimit) {


    Your mileage may vary.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.