Visa ett inlägg
Oläst 2005-06-18, 08:59 #2
Jonas Jonas är inte uppkopplad
Klarade millennium-buggen
 
Reg.datum: Feb 2004
Inlägg: 3 364
Jonas Jonas är inte uppkopplad
Klarade millennium-buggen
 
Reg.datum: Feb 2004
Inlägg: 3 364
Citat:
Originally posted by FredrikMH@Jun 18 2005, 07:54
Kan man ändra timeout för specifika scripts i Apache och kan man göra det med hjälp av php, .htaccess?
Det finns 3st sätt:

PHP.INI
Kod:
max_execution_time 30
.HTACCESS
Kod:
php_admin_value max_execution_time 30
I din php fil
Kod:
ini_set('max_execution_time', 30);
## TILLÄGG ##

Citat:
The maximum execution time is not affected by system calls, stream operations etc. Please see the set_time_limit() function for more details.
Citat:
When called, set_time_limit() restarts the timeout counter from zero. In other words, if the timeout is the default 30 seconds, and 25 seconds into script execution a call such as set_time_limit(20) is made, the script will run for a total of 45 seconds before timing out.

Warning
set_time_limit() has no effect when PHP is running in safe mode. There is no workaround other than turning off safe mode or changing the time limit in the php.ini.

Note: The set_time_limit() function and the configuration directive max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running.
Jonas är inte uppkopplad   Svara med citatSvara med citat