Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 10-07-2009
Member
 
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?
Reply With Quote
  #2  
Old 10-07-2009
Member
 
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.
Reply With Quote
  #3  
Old 10-07-2009
Member
 
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.
Reply With Quote
  #4  
Old 10-07-2009
Member
 
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?
Reply With Quote
  #5  
Old 10-07-2009
Member
 
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
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 08:26 AM.