PHP memory limit
Hi,
Is there any way to set hard limits to PHP settings (such as memory limit and max execution time) so that my customers cannot get over those limits through ini_set function?
I'm using mod_ruid2 + noshell in new servers, and also suPHP + suEXEC in older servers.
Thanks!
Peter
-
Hello, You have to set php memory limit in server php.ini file and disable Custom PHP.INI so that your all customers use only server php.ini 0 -
Hello, Documentation on this topic is available at: The cPanel PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation You may also find this thread helpful: How To Disable Custom PHP.INI in Easyapache 4 Thank you. 0 -
Thanks for your reply! You have to set php memory limit in server php.ini file and disable Custom PHP.INI so that your all customers use only server php.ini
Users seem able to bypass limits in php.ini through ini_set function, such as below. Is there any way to prevent this? I'm thinking to disable ini_set function, but it breaks too many websites. ini_set("max_execution_time", "999999");How To Disable Custom PHP.INI in Easyapache 4
Thanks Michael, is there any guide to disable custom php.ini for mod ruid2? Regards, Peter0 -
Hi, Can anyone please help? Is there any way to restrict the ini_set function to change PHP limits (such as max_execution_time) to unlimited or too high? Thanks 0 -
Is there any way to restrict the ini_set function to change PHP limits (such as max_execution_time) to unlimited or too high?
I don't believe it's possible without completing disabling the ability for user's to utilize ini_set in their scripts. You can find discussion of this topic on the following third-party URLs: How to disable PHP's ini_set for specific configuration options? PHP: How to change configuration settings - Manual Thank you.0
Please sign in to leave a comment.
Comments
5 comments