<commit_before><?php

class AjaxInstallController extends BaseController {

	/**
	* NOSH ChartingSystem Installation Ajax Functions
	*/
	
	public function postInstallProcess()
	{
		set_time_limit(0);
		ini_set('memory_limit','196M');
		
		// Configure database settings
		$db_name = 'nosh';
		$db_username = Input::get('db_username');
		$db_password = Input::get('db_password');
		$connect = mysqli_connect('localhost', $db_username, $db_password);
		if ($connect) {
			$database_filename = __DIR__."/../../.env.php";
			$database_config['mysql_database'] = $db_name;
			$database_config['mysql_username'] = $db_username;
			$database_config['mysql_password'] = $<PASSWORD>;
			file_put_contents($database_filename, '<?php return ' . var_export($database_config, true) . ";\n");
			if (!mysqli_query($connect, "CREATE DATABASE " . $db_name)) {
				echo 'Error creating database: ' . mysqli_error($connect);
				exit (0);
			}
			mysqli_close($connect);
		} else {
			echo "Incorrect username/password for your MySQL database.  Try again.";
			exit (0);
		}
		Session::put('install_progress', 10);
		Session::put('install_note', 'Database created...');
		$smtp_user = Input::get('smtp_user');
		$smtp_pass = Input::get('smtp_pass');
		$username = Input::get('username');
		$password = <PASSWORD>::make(Input::get('password'));
		$email = Input::get('email');<commit_msg>Trial fix of installation script.<commit_after><?php

class AjaxInstallController extends BaseController {

	/**
	* NOSH ChartingSystem Installation Ajax Functions
	*/
	
	public function postInstallProcess()
	{
		set_time_limit(0);
		ini_set('memory_limit','196M');
		
		// Configure database settings
		$db_name = 'nosh';
		$db_username = Input::get('db_username');
		$db_password = Input::get('db_password');
		$connect = mysqli_connect('localhost', $db_username, $db_password);
		if ($connect) {
			$database_filename = __DIR__."/../../.env.php";
			$database_config['mysql_database'] = $db_name;
			$database_config['mysql_username'] = $db_username;
			$database_config['mysql_password'] = $<PASSWORD>;
			if (!mysqli_query($connect, "CREATE DATABASE " . $db_name)) {
				echo 'Error creating database: ' . mysqli_error($connect);
				exit (0);
			}
			mysqli_close($connect);
			file_put_contents($database_filename, '<?php return ' . var_export($database_config, true) . ";\n");
		} else {
			echo "Incorrect username/password for your MySQL database.  Try again.";
			exit (0);
		}
		//Session::put('install_progress', 10);
		//Session::put('install_note', 'Database created...');
		$smtp_user = Input::get('smtp_user');
		$smtp_pass = Input::get('smtp_pass');
		$username = Input::get('username');
		$password = <PASSWORD>(Input::get('password'));
		$email = Input::get('email');
{'fraction_non_alphanumeric': 0.17380261248185777, 'fraction_numerical': 0.005805515239477504, 'mean_word_length': 4.993478260869566, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, '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': '5204418', 'n_tokens_mistral': 1022, 'n_tokens_neox': 892, 'n_words': 171}