Jump to content

safe_mode on or off


cybernet

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.