cybernet Posted May 21, 2010 Share Posted May 21, 2010 i have these in a php file ini_set("memory_limit", "-1"); set_time_limit(0); if safe_mode is on i will get an error in the header what i'm trying to do is to skip these setting when safe_mode is on what i saw on php.net is this <?php // Check for safe mode if( ini_get('safe_mode') ){ // Do it the safe mode way }else{ // Do it the regular way } ?> http://www.php.net/manual/en/features.safe-mode.php#45263 but this post is since 2004, can i use the above code in php5.3.2 ? Link to comment https://forums.phpfreaks.com/topic/202483-safe_mode-on-or-off/ Share on other sites More sharing options...
Mchl Posted May 21, 2010 Share Posted May 21, 2010 Try and see. Link to comment https://forums.phpfreaks.com/topic/202483-safe_mode-on-or-off/#findComment-1061554 Share on other sites More sharing options...
BizLab Posted May 21, 2010 Share Posted May 21, 2010 From what i've read, most programmers recommend leaving safe mode off for security reasons :: one resource - "wicked cool php" (book) Link to comment https://forums.phpfreaks.com/topic/202483-safe_mode-on-or-off/#findComment-1061557 Share on other sites More sharing options...
cybernet Posted May 21, 2010 Author Share Posted May 21, 2010 From what i've read, most programmers recommend leaving safe mode off for security reasons :: one resource - "wicked cool php" (book) some of the host providers think they can be hacked with shell and they set safe_mode = 1 .... Try and see. is it safe ? Link to comment https://forums.phpfreaks.com/topic/202483-safe_mode-on-or-off/#findComment-1061583 Share on other sites More sharing options...
cybernet Posted May 21, 2010 Author Share Posted May 21, 2010 sorry for double post :-\ Link to comment https://forums.phpfreaks.com/topic/202483-safe_mode-on-or-off/#findComment-1061584 Share on other sites More sharing options...
Mchl Posted May 21, 2010 Share Posted May 21, 2010 What could be not safe in testing this code snippet? Link to comment https://forums.phpfreaks.com/topic/202483-safe_mode-on-or-off/#findComment-1061652 Share on other sites More sharing options...
cybernet Posted May 21, 2010 Author Share Posted May 21, 2010 it's not about testing, it's about long term use Link to comment https://forums.phpfreaks.com/topic/202483-safe_mode-on-or-off/#findComment-1061709 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.