10

I would like to change the maximum execution time for a PHP script. In the script I have tried

ini_set("max_execution_time", "1000");

and

set_time_limit(1000);

together and separately.

I also added this line to .htaccess:

php_value max_execution_time 1000

php.ini has safemode off and the Apache server has the flag AllowOverride All. What must I do to get the server to allow a longer execution time?

4

2 に答える 2

7

ini ファイルで変数を設定するとうまくいきます。

max_execution_time = 1000;

set_time_limit() は、セーフ モードでない限り、同様に機能するはずです。

于 2011-04-13T00:27:13.453 に答える
6

.htaccess または 1 つの VirtualHost の構成で使用する Apache2 ディレクティブを探している場合は、おそらく php_admin_value が必要です。

php_admin_value max_execution_time 1000

私の知る限り、これは mod_php でのみ機能します

于 2011-12-03T20:02:23.107 に答える