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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.