Results 1 to 5 of 5

Thread: Setting max_execution_time

  1. #1
    Join Date
    May 2008
    Posts
    72

    Setting max_execution_time

    This problem had been solved long ago, but decided installing a new version of PHP and forgot to back up the php.ini then lost the previous setup, which by the way I do not remember most of the changes.

    Hence this routine again has stopped for exceeding the time limit for completion.

    Well, the page I am setting: set_time_limit (0);

    In the file winnt \ php.ini, I know I have to change the configuration of the max_execution_time variable whose default value is 30.

    Already increased the value but failed, Why it happens?

  2. #2
    Join Date
    May 2008
    Posts
    390

    Re: Setting max_execution_time

    To the maximum execution time of a PHP script to increase, add your PHP script to the following statement. The example set max_execution_time to 5 minutes:

    Code:
      <?  ini_set ( 'max_execution_time', 300);?>
    With 0 set an endless execution time. Please change this value only if effective demand, or you may need a script to take resources and the performance limit.

  3. #3
    Join Date
    Mar 2008
    Posts
    335

    Re: Setting max_execution_time

    Test :

    Put this code in php.ini

    Code:
    safe_mode = Off 
    error_reporting = E_ALL ; Display all errors, warnings and notices 
    register_globals = On 
    cgi.force_redirect = 0 
    max_execution_time = 30
    and run this script:
    (the first line that is commented)

    Code:
    / / set_time_limit (0); 
    sleep ( 32 ); 
    echo " ok "; 
    ?>
    Now uncomment the first line and run again:

    Code:
    set_time_limit (0); 
    sleep ( 32 ); 
    echo " ok "; 
    ?>
    This will appear first in the run-time error exceeded, the second should appear ok.

  4. #4
    Join Date
    Jul 2009
    Posts
    123

    Re: Setting max_execution_time

    Hi,

    I have the following problem with phpMyAdmin must note: I have a large SQL dump file (23 MB) with a full SQL backup of a server on the Internet.

    This SQL file, I would now have to restore the local phpMyAdmin. In the php.ini file under / MAMP/bin/php4/lib / I have some things like the maximum file upload and a script max_execution_time to 900 seconds, because my Mac, the file is not restorewithin the standard 300 seconds . Unfortunately, however, I always get after those 300 seconds max_exection_timeout and the process is terminated.
    Code:
    Fatal error: Maximum execution time of 300 seconds exceeded in / Applications / MAMP / bin / phpMyAdmin / libraries / read_dump.lib.php on line 91
    It looks as if the settings have no effect. In the phpinfo (), however, the entries displayed.

    Someone knows where it might reside?

  5. #5
    Join Date
    Mar 2008
    Posts
    335

    Re: Setting max_execution_time

    Indeed, it remains the simplest

    Code:
    <? php 
    
      Set_time_limit (3); 
    
      Register_shutdown_function ( 'test'); 
    
      while (1) () 
    
      function test () ( 
    	  while (1) () 
      )
    Makes:

    Code:
      Fatal error: Maximum execution time of 3 seconds exceeded in /***/ on line 9 
      Fatal error: Maximum execution time of 3 seconds exceeded in /***/ on line 14
    So here is a simple way to double the execution time allowed by the hosts

Similar Threads

  1. Setting the Standby
    By chetu in forum Operating Systems
    Replies: 3
    Last Post: 10-09-2009, 11:50 AM
  2. Setting up a WPA or WEP key?
    By guest69 in forum Networking & Security
    Replies: 3
    Last Post: 29-06-2009, 09:53 AM
  3. Setting up Connection using Proxy Setting
    By microam_i in forum Networking & Security
    Replies: 2
    Last Post: 30-01-2009, 03:43 PM
  4. Which RAM setting is best ?
    By Sujit15 in forum Motherboard Processor & RAM
    Replies: 4
    Last Post: 29-01-2009, 11:49 PM
  5. Setting GPU Fan
    By Milo.Pressure in forum Overclocking & Computer Modification
    Replies: 7
    Last Post: 27-01-2009, 11:52 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,535,318.62243 seconds with 17 queries