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条)

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题