Как включить безопасный режим для php.ini в Xampp?

Я хочу поместить свой домашний сервер онлайн для личного пользования (использующий Xammp), таким образом, я должен поставить безопасный режим (моей ОС является Windows XP),

Таким образом, я изменил congif php.ini в php папке, расположенной в xampp к этому:

Safe Mode
;
safe_mode = On

; By default, Safe Mode does a UID compare check when
; opening files. If you want to relax this to a GID compare,
; then turn on safe_mode_gid.
safe_mode_gid = On

; When safe_mode is on, UID/GID checks are bypassed when
; including files from this directory and its subdirectories.
; (directory must also be in include_path or full path must
; be used when including)
safe_mode_include_dir =

; When safe_mode is on, only executables located in the safe_mode_exec_dir
; will be allowed to be executed via the exec family of functions.
safe_mode_exec_dir =

; Setting certain environment variables may be a potential security breach.
; This directive contains a comma-delimited list of prefixes.  In Safe Mode,
; the user may only alter environment variables whose names begin with the
; prefixes supplied here.  By default, users will only be able to set
; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR).
;
; Note:  If this directive is empty, PHP will let the user modify ANY
; environment variable!
safe_mode_allowed_env_vars = PHP_

; This directive contains a comma-delimited list of environment variables that
; the end user won't be able to change using putenv().  These variables will be
; protected even if safe_mode_allowed_env_vars is set to allow to change them.
safe_mode_protected_env_vars = LD_LIBRARY_PATH

Но я все еще добираюсь, PHP НЕ работает в "безопасном режиме", теперь я не хочу помещать свой сервер онлайн, прежде чем это произойдет, может любой говорить мне, как исправить эту ошибку, я погуглил его, но это не помогло

Также предложите любые другие меры безопасности / конфигурации, которые я должен брать/изменять прежде, чем поместить его онлайн

2
задан 30.09.2009, 09:58

1 ответ

Я просто отмечаю, что Вы не заполнили safe_mode_exec_dir и я надеюсь, что Вы определили open_basedir. Для нескольких каталогов, убедиться разделить пути с точкой с запятой и двойной кавычкой целая строка пути. Например:

safe_mode = На
safe_mode_exec_dir = "F:\WWW\HTML; F:\batfiles\batch"
open_basedir = "F:\WWW\HTML; F:\batfiles\batch"

Также из руководства PHP:

Безопасный режим удерживается от использования в PHP 5.3.0 и удален в PHP 6.0.0.

Из того же источника:

для NT (IIS) каждый виртуальный хост может работать от различной учетной записи пользователя, таким образом, нет никакой потребности в ограничениях Безопасного режима вообще, если надлежащие права NTFS установлены.

1
ответ дан 12.12.2019, 00:34

Теги

Похожие вопросы