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 ? Quote Link to comment Share on other sites More sharing options...
Mchl Posted May 21, 2010 Share Posted May 21, 2010 Try and see. Quote Link to comment 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) Quote Link to comment 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 ? Quote Link to comment Share on other sites More sharing options...
cybernet Posted May 21, 2010 Author Share Posted May 21, 2010 sorry for double post :-\ Quote Link to comment 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? Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.