php 安全设置
2013-05-03 11:53
246 查看
vi /etc/php.ini #编辑配置文件
date.timezone = PRC #把前面的分号去掉,改为date.timezone = PRC
disable_functions=passthru,
exec,system,chroot,chgrp,chown,shell_exec,pro
c_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlin
k,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_s
pace,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ct
ermid,posix_get_last_error,posix_getcwd,
posix_getegid,posix_geteuid,posix_getgid,
posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix
_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid,
posix_getrlimit, posix_getsid,posix_getuid,posix_isatty,
posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,
posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname
,posix_uname
#列出PHP 可以禁用的函数,如果某些程序需要用到这个函数,可以删除,取消禁用。
expose_php = Off #禁止显示php 版本的信息
display_errors = OFF #关闭错误提示
register_globals = OFF #关闭注册全局变量
magic_quotes_gpc = On #打开magic_quotes_gpc 来防止SQL 注入
log_errors = On #记录错误日志
error_log = /var/log/php/error_log.log #设置错误日志存放目录,文件必须允许apache
date.timezone = PRC #把前面的分号去掉,改为date.timezone = PRC
disable_functions=passthru,
exec,system,chroot,chgrp,chown,shell_exec,pro
c_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,openlog,syslog,readlin
k,symlink,popepassthru,stream_socket_server,escapeshellcmd,dll,popen,disk_free_s
pace,checkdnsrr,checkdnsrr,getservbyname,getservbyport,disk_total_space,posix_ct
ermid,posix_get_last_error,posix_getcwd,
posix_getegid,posix_geteuid,posix_getgid,
posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix
_getpgrp,posix_getpid, posix_getppid,posix_getpwnam,posix_getpwuid,
posix_getrlimit, posix_getsid,posix_getuid,posix_isatty,
posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,
posix_setpgid,posix_setsid,posix_setuid,posix_strerror,posix_times,posix_ttyname
,posix_uname
#列出PHP 可以禁用的函数,如果某些程序需要用到这个函数,可以删除,取消禁用。
expose_php = Off #禁止显示php 版本的信息
display_errors = OFF #关闭错误提示
register_globals = OFF #关闭注册全局变量
magic_quotes_gpc = On #打开magic_quotes_gpc 来防止SQL 注入
log_errors = On #记录错误日志
error_log = /var/log/php/error_log.log #设置错误日志存放目录,文件必须允许apache
相关文章推荐
- WindowsServer2003 + IIS6.0 + ASP + NET + PHP + PERL + MSSQL + MYSQL 最新服务器安全设置技术实例
- php中几种常见安全设置详解
- WindowsServer2003 + IIS6.0 + ASP + NET + PHP + PERL + MSSQL + MYSQL 最新服务器安全设置技术实例
- WindowsServer2003 + IIS6.0 + ASP + NET + PHP + PERL + MSSQL + MYSQL 最新服务器安全设置技术实
- 阿里云linux CentOS6.5(nginx+PHP-fpm)及RDS初级使用指南和简单安全设置
- 阿里云CentOS6.5(nginx+PHP-fpm)及RDS初级使用指南和简单安全设置
- linux web php 安全相关设置
- 内核参数优化和PHP 安全设置
- PHP 一些安全设置
- PHP安全设置一则
- WindowsServer2003 + IIS6.0 + ASP + NET + PHP + PERL + MSSQL + MYSQL 最新服务器安全设置技术实例
- WindowsServer2003 + IIS6.0 + ASP + NET + PHP + PERL + MSSQL + MYSQL 最新服务器安全设置技术实例
- nginx + fastcgi php配置下,安全的文件上存路径设置
- PhpCms系统安全设置图文教程
- DEDECMS安全设置 执行php脚本限制设置方法(iis6+iis7+apache+nginx)
- WindowsServer2003 + IIS6.0 + ASP + NET + PHP + PERL + MSSQL + MYSQL 最新服务器安全设置技术实例
- PHP安全设置之PHP.ini
- Debian的php和apache安全设置
- PHP开发安全设置
- [Windows Server 2012] Apache+PHP安全设置