Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

set_time_limit() has been disabled for security reasons

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

like image 544
Michal Artazov Avatar asked Oct 27 '25 13:10

Michal Artazov


2 Answers

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.

like image 160
BudwiseЯ Avatar answered Oct 30 '25 02:10

BudwiseЯ


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.

like image 40
Fenton Avatar answered Oct 30 '25 02:10

Fenton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!