3

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

4

3 回答 3

2

这似乎set_time_limit在您php.ini禁用功能中被禁用。尝试set_time_limit从那里删除是否对您有帮助。

于 2013-07-02T19:42:08.203 回答
1

网络托管公司这样做是为了防止您运行可能影响共享服务器的其他网站的可用性的非常长时间运行的进程。

如果您需要在共享主机上运行,​​您需要找到一种方法来以较小的块完成您需要的操作。

于 2013-07-02T19:21:27.887 回答
0

好吧,看起来我只是愚蠢...我在根文件夹中有 .htaccess 文件,因此我不是从本地主机运行脚本,而是从显然失败的共享主机运行脚本...删除 .htaccess 后它可以工作美好的!

于 2013-07-03T19:50:34.687 回答