QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2505|回复: 1

设置环境变量putenv

[复制链接]
发表于 2005-12-6 11:08:49 | 显示全部楼层 |阅读模式
我在   linx+php4.3.3 下面用putenv()设置了几个环境变量,

变量有我自己添加的,有系统原有的,可是为什么设置的变量用phpinfo()打出

却一点反应也没有呢?
发表于 2005-12-7 09:39:03 | 显示全部楼层
Setting certain environment variables may be a potential security breach. The safe_mode_allowed_env_vars 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 by this directive. 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!

The safe_mode_protected_env_vars 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.
因为使用PHP设置环境变量存在隐藏的安全隐患。
safe_mode_protected_env_vars受保护的环境变量列表会限制你更改环境变量,防止你的Hacking Attempt。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-19 01:29 , Processed in 0.100235 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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