Ejemplo n.º 1
0
if (!update_htaccessFile()) {
    echo '<h2>Failed to update the .htaccess file. </h2>';
    echo 'You can either proceed with the installtion and manually copy the .htaccess from egnine/install folder after installtion, or <br>';
    echo 'Re-start the installation after giving write access to .htaccess file';
} else {
    $write_file_link = HOME_DIR . DS . '.htaccess';
    if (!chmod($write_file_link, 0644)) {
        echo "<br>Failed to change the access level of the .htacess file. Change the .htaccess file to 06444 mode after installation";
    }
}
if ($proceed) {
    //erify db version
    $db_version = $dbc->connection->getAttribute(PDO::ATTR_CLIENT_VERSION);
    pa($db_version);
    //verify if any existing data exists
    $existing_tables = view::count_all_tables();
    if (empty($existing_tables->table_count)) {
        $db_setting_file_path = HOME_DIR . DS . 'includes' . DS . 'basics' . DS . 'settings' . DS . 'dbsettings.inc';
        $db_setting_file = fopen($db_setting_file_path, "w");
        $result = fwrite($db_setting_file, $dbsetting_file);
        if ($result > 0) {
            if (!chmod($db_setting_file_path, 0644)) {
                echo "<br>Failed to change the access level of .dbsettings file. Change the .dbsettings file to 06444 mode after installtion";
            }
            echo "<br>Make sure that the write access from inlcudes directory, basics directory, .htaccess file and dbsettings are removed<br><br>";
        } else {
            echo "<br>Database settings file creation failed!. Verify the wrtite access to inlcudes directory, basics directory and dbsettings file<br><br>";
            $proceed = false;
        }
        fclose($db_setting_file);
    } else {
Ejemplo n.º 2
0
<?php

include_once "../../includes/basics/basics.inc";
$table_count = view::count_all_tables();
$progress_percentage = array('progress' => $_SESSION['progress_percentage']);
if (count($table_count) == 0) {
    return false;
} else {
    echo header('Content-Type: application/json');
    echo json_encode($table_count);
}