duanhai1455 2012-03-21 11:28
浏览 46
已采纳

设置max_executing时间?

I have a server with debian. Server host X vservers (for example 1vserver to pound, second to SQL, third for website X etc). I'm working on one vserver. I have apache2 with one website. In my php.ini I have max_execution_time = 300 and max_input_time = 249 But when I run script php:

 echo '1';
 sleep(16);
 echo '2';

I get error Internal Server Error but I don't have any information in error_log. When I set sleep on 14 sec - this works...

My guess is -> something on debian set time of executing script to 15 sec and ignore setting in php.ini. Our root don't know what this is. Can you help me?

I change my script:

<?php
ini_set('error_reporting', E_ALL);
error_reporting(E_ALL);
ini_set('log_errors', true);
ini_set('html_errors', false);
ini_set('error_log', dirname(__FILE__).'script_error.log');
ini_set('display_errors', true);
//set_time_limit(1200);
ini_set("max_execution_time",1200);

echo '1';
sleep(16);
echo '2';
?>

And I get 500 error and I don't have any info in error_log. If sleep(14) than is ok.

EDIT2:

I change LogLevel na info, debug, notice and warn.And I don't have any information about errror

EDIT3:

Problem is solve. Problem is server pound (http://linux.die.net/man/8/pound). Default value of timeout was setting on 15s. Thank for help for all

  • 写回答

5条回答 默认 最新

  • drwg89980 2012-03-21 11:32
    关注

    max_executing_time is written wrong. It should be: max_execution_time.

    Use phpinfo() to see what the runtime value is, if it doesn't correspond to the value in the ini then check (again, from phpinfo() output) that you are using the right ini file.

    Finnaly, if phpinfo() max_execution_time corresponds to the value in the ini, then maybe something in your code is calling ini_set('max_execution_time' ...).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源
  • ¥15 安卓JNI项目使用lua上的问题
  • ¥20 RL+GNN解决人员排班问题时梯度消失
  • ¥60 要数控稳压电源测试数据
  • ¥15 能帮我写下这个编程吗
  • ¥15 ikuai客户端l2tp协议链接报终止15信号和无法将p.p.p6转换为我的l2tp线路