2013-07-02 19:19
浏览 423


I need to set set_time_limit(0); in my PHP script but I get

Warning: set_time_limit() has been disabled for security reasons

I already tried increasing max_execution_time property in my php.ini with no effect. I'm running WAMP 2.4 with Apache 2.4.4 and PHP 5.4.12.

EDIT: I'm running it on my localhost, not shared hosting

图片转代码服务由CSDN问答提供 功能建议

我需要在我的PHP脚本中设置 set_time_limit(0); 但我得到< / p>


我已经尝试在php.ini中增加 max_execution_time 属性而没有任何效果。 我正在使用Apache 2.4.4和PHP 5.4.12运行WAMP 2.4。


  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • douzhi9635 2013-07-03 19:50

    OK looks like I was just stupid... I had .htaccess file in the root folder and due to that I was running the script not from my localhost but from shared hosting where obviously it failed... after removing the .htaccess it works fine!

    解决 无用
    打赏 举报
  • douzongmu2543 2013-07-02 19:21

    Web hosting companies do this to prevent you from running very-long-running processes that could impact the availability of other websites sharing the server.

    If you need to run on shared hosting, you'll need to find a way of doing what you need in smaller chunks.

    解决 无用
    打赏 举报
  • douxian9706 2013-07-02 19:42

    It seems that set_time_limit is disabled in your php.ini's disable functions. Try if removing set_time_limit from there helps you.

    解决 无用
    打赏 举报

相关推荐 更多相似问题