dqq46733 2013-04-02 20:35
浏览 111

Linux服务器上的内部服务器错误(500)和PHP max_execution_time

I have a php script that need to be processed for one to 5 hours (sending newsletters to our customers). I tried both set_time_limit(2000); and ini_set('max_execution_time', 360000); but neither works. They work perfectly on the XAMPP local server, but they do not work on our dedicated server (Unix & Apache). I also changed the Apache timeout to 300 (which was 50), yet after 30 seconds of script running, it returns this:

Internal Server Error Page (Error 500)

I have no idea if there is any other place for timeout and/or why the server does not honor the ini_set() or set_time_limit() functions. We are using Unix CentOS 6 and Plesk 11.9 as server. I also changed the default php.ini max_execution_time, and it works...

I read many articles and forums, yet I don't know why this happens. I appreciate your help.

  • 写回答

4条回答 默认 最新

  • duanpengya7074 2013-04-02 20:38
    关注

    a better way would be using ini_set() or set_time_limit() at the top of the script which sends newsletters to the customers...you should not try to main config files...and also, as someone suggested above, cron jobs are good fit for such situations..

    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器