LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 703|回复: 3

如何取消PHP的目录执行力

[复制链接]
发表于 2003-10-21 14:05:54 | 显示全部楼层 |阅读模式
Alias /scms/ "/home/scms/"
    567     <Directory "/home/scms">
    568              Options Indexes MultiViews
    569              AllowOverride None
    570              Order allow,deny
    571              Allow from all
    572          </Directory>

发现这个目录还有PHP的执行能力,怎么样去除。
发表于 2003-10-21 14:14:02 | 显示全部楼层
./configure --enable-safe-mode
change php.ini ,set by yourself
; Safe Mode
;
safe_mode = Off

; 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 = Off

; 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

; open_basedir, if set, limits all file operations to the defined directory
; and below.  This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
;open_basedir =
maybe need install new php ver 4.3.3
if you install php as apache SAPI mode
add this in you httpd.conf
php_admin_value open_basedir /w3/www
HOHO,OMG chinese english
hoho,why SCIM crash
 楼主| 发表于 2003-10-21 14:17:10 | 显示全部楼层
其他的PHP执行权限还要啦。我只要scms这个目录没有就行。
发表于 2003-10-21 14:43:10 | 显示全部楼层
; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues.  The alternate is to use the
; cgi.force_redirect configuration below
doc_root = "e:\w3\www"

; The directory under which PHP opens the script using /~usernamem used only
; if nonempty.
user_dir =

应该是这个了,有些东西自己试验试验啦,比如刚才那个。
你自己让那个目录置干openbasedir外吗,很多的参数阅读php.ini全局配置啦
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表