Support » Plugins » [Plugin: WP Super Cache] “Warning! PHP safe mode enabled!”… but safe mode is OFF

  • Hi 🙂

    I’ve installed WordPress MU (latest RC1 version) in my ftp space, with php5 and safe_mode=OFF. I’ve also installed WP Super Cache in mu-plugins directory, following the instructions step-by-step.

    However, the plugin’s configuration page returns me the error:

    Warning! PHP safe mode enabled!

    You may experience problems running this plugin because SAFE MODE is enabled. Your server is set up to check the owner of PHP scripts before allowing them to read and write files.

    You or an administrator may be able to make it work by changing the group owner of the plugin scripts to match that of the web server user. The group owner of the wp-content/cache/ directory must also be changed. See the safe mode manual page for further details.

    What should I do? 🙁

    PS: sorry for my bad English, I’m Italian… 😛

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    If WP Super Cache says safe mode is on, then safe mode is on. Period. That’s all there is to it, and you are mistaken if you think it’s off.

    Here’s the code it uses:

    if( ini_get( 'safe_mode' ) ) {
       ?><h3>Warning! PHP safe mode enabled!</h3>

    Simple as that, really.

    Why do you think safe mode is off?

    @otto42: thanks for the answer! 😉

    Why do you think safe mode is off?

    ‘Cause the output of phpinfo() says it: 😕

    Sorry for the double post…
    A little modification to wp-cache.php (line 101) seems to solve the problem:
    if( ini_get( 'safe_mode' ) != 'off' ) { //if( ini_get( 'safe_mode' ) ) {
    I think the second if should be edited, too:
    if( !ini_get( 'safe_mode_gid' ) ) {

    If you think that this modification is safe, I’ll activate the plugin… 😉

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    No no, that’s not what I meant. I don’t care what phpinfo() says, I’m interested in the actual setting itself. Where and how did you disable safe_mode?

    See, safe_mode is a flag, setting it to “on” or “off” in the php.ini is incorrect. It should be set to one or zero instead. If it’s set to the string of “off” then the results are not entirely predictable.

    PHP’s own documentation on safe mode:

    Some versions of PHP do interpret “On” and “Off” in the config file as 1 and 0, but these vary a lot, which is why 1 and 0 is best.

    @otto42: I don’t have the control of the server, I’ve got only ftp access 😉 (it’s a shared hosting)… so editing wp-cache.php file is the only thing I can do, I suppose 😉

    Should I change anything else, before activating the plugin? 🙂

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    You don’t even need to change that, actually. It’s just a warning, it doesn’t actually prevent anything from working.

    Super cache has several checks in it like that.

    Ok, thanks! 😉

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WP Super Cache] “Warning! PHP safe mode enabled!”… but safe mode is OFF’ is closed to new replies.