<commit_before><?php
@set_time_limit(0);
date_default_timezone_set('Asia/Shanghai');
//error_reporting(0); //don't show errors

$Message = '';
$Version = '5.9.0';
define('PREFIX', 'carbon_');
if (function_exists('apache_get_modules') && !in_array('mod_rewrite', apache_get_modules())) {
	die("Apache用户请先开启mod_rewrite！<br>Please enable Apache mod_rewrite! ");
}
if (is_file('install.lock')) {
	die("请删除 install/install.lock 文件后再进行操作！<br>Please Remove install/install.lock before install!");
//Exit for more security
	exit();
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
	$fp = fopen(__DIR__ . '/database.sql', "r") or die("SQL文件无法打开。  The SQL File could not be opened.");
	//dobefore
	if (isset($_POST["Language"]) && isset($_POST["DBHost"]) && isset($_POST["DBName"]) && isset($_POST["DBUser"]) && isset($_POST["DBPassword"])) {
		$Language = $_POST['Language'];
		$DBHost = $_POST['DBHost'];
		$DBName = $_POST['DBName'];
		$DBUser = $_POST['DBUser'];
		$DBPassword = $_POST['DBPassword'];
		$SearchServer = $_POST['SearchServer'];
		$SearchPort = $_POST['SearchPort'];
		$EnableMemcache = $_POST['EnableMemcache'];
		$MemCachePrefix = $_POST['MemCachePrefix'];
	} else {
		die("An Unexpected Error Occured!");<commit_msg>检查是否config可写<commit_after><meta charset="utf-8">

<?php
@set_time_limit(0);
date_default_timezone_set('Asia/Shanghai');
//error_reporting(0); //don't show errors

$Message = '';
$Version = '5.9.0';
define('PREFIX', 'carbon_');
if (function_exists('apache_get_modules') && !in_array('mod_rewrite', apache_get_modules())) {
	die("Apache用户请先开启mod_rewrite！<br>Please enable Apache mod_rewrite! ");
}
if (is_file('install.lock')) {
	die("请删除 install/install.lock 文件后再进行操作！<br>Please Remove install/install.lock before install!");
//Exit for more security
	exit();
}

//检查config是否可写
if (!is_writeable(__DIR__ . '/config.tpl')) die("Config文件不可写。  The Config File is not writeable ");

if ($_SERVER['REQUEST_METHOD'] == 'POST') {
	$fp = fopen(__DIR__ . '/database.sql', "r") or die("SQL文件无法打开。  The SQL File could not be opened.");
	//dobefore
	if (isset($_POST["Language"]) && isset($_POST["DBHost"]) && isset($_POST["DBName"]) && isset($_POST["DBUser"]) && isset($_POST["DBPassword"])) {
		$Language = $_POST['Language'];
		$DBHost = $_POST['DBHost'];
		$DBName = $_POST['DBName'];
		$DBUser = $_POST['DBUser'];
		$DBPassword = $_POST['DBPassword'];
		$SearchServer = $_POST['SearchServer'];
		$SearchPort = $_POST['SearchPort'];
		$EnableMemcache = $_POST['EnableMemcache'];
		$MemCachePrefix = $_POST['MemCachePrefix'];
	} else {
		die("An Unexpected Error Occured!");
{'fraction_non_alphanumeric': 0.2071097372488408, 'fraction_numerical': 0.004250386398763524, 'mean_word_length': 6.614705882352941, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2437397', 'n_tokens_mistral': 943, 'n_tokens_neox': 943, 'n_words': 172}