Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复RASP PHP Agent在宝塔PHP环境的安装BUG #474

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexiaChen
Copy link

@AlexiaChen AlexiaChen commented Jun 5, 2024

修复RASP PHP Agent在宝塔PHP环境的安装BUG

宝塔是一个运维工具,可以傻瓜式安装PHP环境,一些PHP的宝塔用户比较多: https://www.bt.cn/

问题描述

原始的install.php脚本在宝塔PHP环境的时候,把OpenRASP的ini配置写入了错误的php.ini文件中。宝塔安装的PHP有一个php-cli.ini, install.php把配置写入了cli中,导致重启php-fpm OpenRASP的配置不生效,OpenRASP的管理后端看不到宿主机Agent上报的心跳。在host列表中没有显示。

解决方案

检测php-cli.ini同级目录有没有php.ini存在,如果存在,再把同样的配置写入php.ini中

运行截图:

image

image

由上图得知,在宝塔安装的PHP环境中,RASP的配置最开始写入php-cli.ini中了,导致即使重启php-fpm RASP配置不生效。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant