在最高权限下执行相关命令
1)查看PHP配置
php --ini Configuration File (php.ini) Path: /www/server/php/70/etc Loaded Configuration File: /www/server/php/70/etc/php.ini Scan for additional .ini files in: (none) Additional .ini files parsed: (none)
2)重启服务
service php-fpm restart
Redirecting to /bin/systemctl restart php-fpm.service
3) 隐藏请求response 返回的 X-Powered-By:PHP/7.0.25
修改php.ini配置文件 ;;;;;;;;;;;;;;;;; ; Miscellaneous ; ;;;;;;;;;;;;;;;;; ; Decides whether PHP may expose the fact that it is installed on the server ; (e.g. by adding its signature to the Web server header). It is no security ; threat in any way, but it makes it possible to determine whether you use PHP ; on your server or not. ; http://php.net/expose-php expose_php = On 将On 改成Off 即可
4) 查看PHP扩展
php -m
常见错误:
1) The Process class relies on proc_open, which is not available on your PHP installation.
将php.ini中disable_function 中将 proc_open、proc_get_status 去除并重启PHP