Skip to content

Commit

Permalink
调整安装程序里的消息
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Lewis committed Jul 24, 2018
1 parent dc70a4f commit 38a2263
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions rasp-install/php/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function get_ini_content($lib_filename, $root_dir)
;当SQL查询结果行数大于或等于该值,则认为是慢查询
;openrasp.slowquery_min_rows=500
;报警是否开启 syslog
;openrasp.syslog_alarm_enable=Off
Expand Down Expand Up @@ -126,7 +126,7 @@ function get_ini_content($lib_filename, $root_dir)
php install.php [options]
Options:
-d <openrasp_root> Specify OpenRASP installation folder, which is essential
-d <openrasp_root> Specify OpenRASP installation folder (required)
--ignore-ini Do not update PHP ini entries
Expand All @@ -150,14 +150,14 @@ function get_ini_content($lib_filename, $root_dir)
}

//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 检察依赖扩展 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
major_tips('Check whether dependent PHP extensions are installed');
major_tips('Check whether required PHP extensions are installed');
$dep_exts = array('json', 'PDO');
if (!check_dep_exts_installed($dep_exts)) {
log_tips(ERROR, implode(" ",$dep_exts) . " must be installed correctly.");
log_tips(ERROR, "OpenRASP depends on the following PHP extension: " . implode(" ", $dep_exts) . " . Make sure they are installed on your system.");
}

//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 拷贝动态库 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
major_tips('Installing OpenRASP PHP Extension');
major_tips('Installing OpenRASP PHP extension');
if (!file_exists($extension_dir)) {
log_tips(ERROR, "Extension directory '$extension_dir' does not exist");
}
Expand Down Expand Up @@ -191,13 +191,13 @@ function get_ini_content($lib_filename, $root_dir)
$ini_scanned_path = $ini_scanned_root . "mods-available";
foreach ($supported_sapi as $key => $value) {
if (file_exists($ini_scanned_root.$value) && is_dir($ini_scanned_root.$value)) {
$ini_symbol_links[$value] = $ini_scanned_root.$value.DIRECTORY_SEPARATOR . 'conf.d/99-openrasp.ini';
$ini_symbol_links[$value] = $ini_scanned_root . $value . DIRECTORY_SEPARATOR . 'conf.d/99-openrasp.ini';
}
}
}
}
if (!is_writable($ini_scanned_path)) {
log_tips(ERROR, $ini_scanned_path . ' is not writable, please make sure you have write permissions!');
log_tips(ERROR, $ini_scanned_path . ' is not writable, make sure you have write permissions.');
}

$ini_src = $ini_scanned_path.DIRECTORY_SEPARATOR.$ini_scanned_file;
Expand Down Expand Up @@ -234,7 +234,7 @@ function get_ini_content($lib_filename, $root_dir)
}
foreach($ini_files_2b_updated as $key=>$ini_file) {
if (!is_writable($ini_file)) {
log_tips(ERROR, $ini_file . ' is not writable, please make sure you have write permissions!');
log_tips(ERROR, $ini_file . ' is not writable, make sure you have write permissions');
}
if (!copy($ini_file, $ini_file.'.bak')) {
log_tips(ERROR, "Unable to backup old ini file: '$ini_file'");
Expand Down

0 comments on commit 38a2263

Please sign in to comment.