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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions rasp-install/php/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,13 @@ public function getOptions()
array_push($ini_files_2b_updated, $wamp_apache_ini);
}
}
$first_ini_file_path = $ini_files_2b_updated[0];
$file_name = basename($first_ini_file_path);
$dir_name = dirname($first_ini_file_path);
$php_ini_file_path = $dir_name . DIRECTORY_SEPARATOR . 'php.ini';
if ($file_name != 'php.ini' && file_exists($php_ini_file_path)) {
array_push($ini_files_2b_updated, $php_ini_file_path);
}
foreach ($ini_files_2b_updated as $key => $ini_file) {
if (!is_writable($ini_file)) {
log_tips(ERROR, $ini_file . ' is not writable, make sure you have write permissions');
Expand Down