]> source.dussan.org Git - nextcloud-server.git/commitdiff
more accurate safe_mode check - refs #2258
authorThomas Mueller <thomas.mueller@tmit.eu>
Tue, 19 Mar 2013 13:36:52 +0000 (14:36 +0100)
committerBernhard Posselt <nukeawhale@gmail.com>
Fri, 12 Apr 2013 23:16:45 +0000 (01:16 +0200)
lib/util.php

index 09671eadf8c993ff936cd229c244441d10f8432a..0c3ee303cda1a45a28dd157351bb5504b9ac0268 100755 (executable)
@@ -278,7 +278,10 @@ class OC_Util {
                                'hint'=>'Please ask your server administrator to install the module.');
                        $web_server_restart= false;
                }
-               if(ini_get('safe_mode')) {
+               if (((strtolower(@ini_get('safe_mode')) == 'on')
+                       || (strtolower(@ini_get('safe_mode')) == 'yes')
+                       || (strtolower(@ini_get('safe_mode')) == 'true')
+                       || (ini_get("safe_mode") == 1 ))) {
                        $errors[]=array('error'=>'PHP Safe Mode is enabled. ownCloud requires that it is disabled to work properly.',
                                'hint'=>'PHP Safe Mode is a deprecated and mostly useless setting that should be disabled. Please ask your server administrator to disable it in php.ini or in your webserver config.');
                        $web_server_restart= false;