php内置动态模块安装,如何在webmin安装Sohosin安全模块(动态安装,不需要重新编译php)...

本文档介绍了如何在Linux环境中通过SSH为webmin安装Suhosin安全模块,包括下载、编译和配置过程。安装完成后,通过phpinfo()可以验证Suhosin是否成功启用,此教程适用于需要增强PHP安全性的服务器管理员。
摘要由CSDN通过智能技术生成

有一些商城客户希望在webmin安装Sohosin安全模块,经过研究,我们给出下面的教材以供参考,请ssh自行安装。一般网站,不推荐安装它。如需要我们为您安装,收取100元/次的费用。

动态安装suhosin(动态安装,不需要重新编译php):

yum -y install gcc gcc+

wget http://download.suhosin.org/suhosin-0.9.31.tgz

tar zxvf suhosin-0.9.31.tgz

cd suhosin-0.9.31

phpize

./configure --with-php-config=/usr/local/php/bin/php-config

./configure

make

make install

vi /etc/php.ini  添加如下几行

extension=suhosin.so

[suhosin]

suhosin.get.max_value_length = 5120

重启apache

service httpd restart

安装成功后,phpinfo会显示如下:

index.php?=SUHO8567F54-D428-14d2-A769-00DA302A5F18This server is protected with the Suhosin Extension 0.9.31

Copyright (c) 2006-2007Hardened-PHP Project

Copyright (c) 2007-2010SektionEins GmbH

Directive

Local Value

Master Value

suhosin.apc_bug_workaround

Off

Off

suhosin.cookie.checkraddr

0

0

suhosin.cookie.cryptdocroot

On

On

suhosin.cookie.cryptkey

[ protected ]

[ protected ]

suhosin.cookie.cryptlist

no value

no value

suhosin.cookie.cryptraddr

0

0

suhosin.cookie.cryptua

On

On

suhosin.cookie.disallow_nul

1

1

suhosin.cookie.disallow_ws

1

1

suhosin.cookie.encrypt

Off

Off

suhosin.cookie.max_array_depth

50

50

suhosin.cookie.max_array_index_length

64

64

suhosin.cookie.max_name_length

64

64

suhosin.cookie.max_totalname_length

256

256

suhosin.cookie.max_value_length

10000

10000

suhosin.cookie.max_vars

100

100

suhosin.cookie.plainlist

no value

no value

suhosin.coredump

Off

Off

suhosin.disable.display_errors

Off

Off

suhosin.executor.allow_symlink

Off

Off

suhosin.executor.disable_emodifier

Off

Off

suhosin.executor.disable_eval

Off

Off

suhosin.executor.eval.blacklist

no value

no value

suhosin.executor.eval.whitelist

no value

no value

suhosin.executor.func.blacklist

no value

no value

suhosin.executor.func.whitelist

no value

no value

suhosin.executor.include.allow_writable_files

On

On

suhosin.executor.include.blacklist

no value

no value

suhosin.executor.include.max_traversal

0

0

suhosin.executor.include.whitelist

no value

no value

suhosin.executor.max_depth

0

0

suhosin.filter.action

no value

no value

suhosin.get.disallow_nul

1

1

suhosin.get.disallow_ws

0

0

suhosin.get.max_array_depth

50

50

suhosin.get.max_array_index_length

64

64

suhosin.get.max_name_length

64

64

suhosin.get.max_totalname_length

256

256

suhosin.get.max_value_length

5120

5120

suhosin.get.max_vars

100

100

suhosin.log.file

0

0

suhosin.log.file.name

no value

no value

suhosin.log.phpscript

0

0

suhosin.log.phpscript.is_safe

Off

Off

suhosin.log.phpscript.name

no value

no value

suhosin.log.sapi

0

0

suhosin.log.script

0

0

suhosin.log.script.name

no value

no value

suhosin.log.syslog

no value

no value

suhosin.log.syslog.facility

no value

no value

suhosin.log.syslog.priority

no value

no value

suhosin.log.use-x-forwarded-for

Off

Off

suhosin.mail.protect

0

0

suhosin.memory_limit

0

0

suhosin.mt_srand.ignore

On

On

suhosin.multiheader

Off

Off

suhosin.perdir

0

0

suhosin.post.disallow_nul

1

1

suhosin.post.disallow_ws

0

0

suhosin.post.max_array_depth

50

50

suhosin.post.max_array_index_length

64

64

suhosin.post.max_name_length

64

64

suhosin.post.max_totalname_length

256

256

suhosin.post.max_value_length

1000000

1000000

suhosin.post.max_vars

1000

1000

suhosin.protectkey

On

On

suhosin.request.disallow_nul

1

1

suhosin.request.disallow_ws

0

0

suhosin.request.max_array_depth

50

50

suhosin.request.max_array_index_length

64

64

suhosin.request.max_totalname_length

256

256

suhosin.request.max_value_length

1000000

1000000

suhosin.request.max_varname_length

64

64

suhosin.request.max_vars

1000

1000

suhosin.server.encode

On

On

suhosin.server.strip

On

On

suhosin.session.checkraddr

0

0

suhosin.session.cryptdocroot

On

On

suhosin.session.cryptkey

[ protected ]

[ protected ]

suhosin.session.cryptraddr

0

0

suhosin.session.cryptua

Off

Off

suhosin.session.encrypt

On

On

suhosin.session.max_id_length

128

128

suhosin.simulation

Off

Off

suhosin.sql.bailout_on_error

Off

Off

suhosin.sql.comment

0

0

suhosin.sql.multiselect

0

0

suhosin.sql.opencomment

0

0

suhosin.sql.union

0

0

suhosin.sql.user_postfix

no value

no value

suhosin.sql.user_prefix

no value

no value

suhosin.srand.ignore

On

On

suhosin.stealth

On

On

suhosin.upload.disallow_binary

0

0

suhosin.upload.disallow_elf

1

1

suhosin.upload.max_uploads

25

25

suhosin.upload.remove_binary

0

0

suhosin.upload.verification_script

no value

no value

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值