php安装suhosin扩展
[root@lxk ~]# wget https://github.com/sektioneins/suhosin/archive/master.zip [root@lxk ~]# unzip master.zip [root@lxk ~]# cd suhosin-master/ [root@lxk suhosin-master]# which phpize /usr/bin/phpize [root@lxk suhosin-master]# rpm -qf /usr/bin/phpize #确定phpize为要安装suhosin扩展的php版本 php-cli-5.6.40-1.el7.remi.x86_64 [root@lxk suhosin-master]# phpize Configuring for: PHP Api Version: 20131106 Zend Module Api No: 20131226 Zend Extension Api No: 220131226 [root@lxk suhosin-master]# which php-config /usr/bin/php-config [root@lxk suhosin-master]# rpm -qf `which php-config` #确定php-config为要安装suhosin扩展的php版本 php-devel-5.6.40-1.el7.remi.x86_64 [root@lxk suhosin-master]# ./configure --with-php-config=/usr/bin/php-config [root@lxk suhosin-master]# make && make install [root@lxk suhosin-master]# echo "extension=suhosin.so" >> /etc/php.ini #在配置文件中启用suhosin.so扩展 [root@lxk suhosin-master]# tail -5 /etc/php.ini ; Local Variables: ; tab-width: 4 ; End: extension=suhosin.so [root@lxk suhosin-master]# systemctl start php-fpm #启动php-fpm [root@lxk suhosin-master]# php-fpm -m | grep suhosin #查看suhosin扩展是否已加载
extension=suhosin.so suhosin.executor.disable_eval = on
我安装的
下载
wget https://github.com/sektioneins/suhosin/archive/master.zip
解压
unzip master.zip
使phpize 安装
/www/server/php/70/bin/phpize
./configure --with-php-config=/www/server/php/70/bin/php-config
make && make install
php.ini配置
extension = "suhosin.so"
suhosin.executor.disable_eval = On