{
    if ($text !== false) {
        echo $text . PHP_EOL;
    } else {
        echo "----------------------------------" . PHP_EOL;
    }
}
function r()
{
    return readline("> ");
}
p("Welcome to Digital Footprint Profile " . VERSION . " configurator.");
p("Made by Zachary J. DuBois - https://zacharydubois.me");
p("Checking dependencies...");
require APP . 'inc' . DS . 'Checks.php';
if (phpVersionCheck()) {
    p("PHP " . PHP_VERSION . " meets requirement...");
} else {
    p("You need at least PHP 5.5 to run this.");
    p("Exiting...");
    exit;
}
if (composerCheck()) {
    p("Composer vendor autoload.php exists. Assuming all other dependencies have been installed...");
} else {
    p("You did not complete the installation process. Composer dependencies were not installed.");
    p("Exiting...");
    exit;
}
p("Dependency checks passed.");
p("Checking directory permissions...");
예제 #2
0
<?php

if (!defined('SIMIAN_INSTALLER')) {
    exit('No direct script access allowed');
}
define("BASEPATH", str_replace("\\", "/", realpath(dirname(__FILE__)) . '/'));
define("INSTALL_LOCK_FILE", getcwd() . "/InstallLock_" . str_replace(' ', '_', INSTALLER_PROJECT));
require 'lib/common.php';
$result = installerInit();
if (installerStep() === STEP_PHP_REQUIREMENTS) {
    if (isRedirect()) {
        redirectSelf();
    }
    $result['page'] = "PHP Requirements";
    $result['php_version'] = phpVersionCheck();
    $result['modules'] = phpModuleList();
} else {
    if (installerStep() === STEP_DB_CONFIG) {
        if ($_SERVER['REQUEST_METHOD'] == "GET") {
            if (isRedirect()) {
                redirectSelf();
            }
            $result['page'] = "DB Config";
            $result['db_config'] = dbGetConfig();
        } else {
            if ($_SERVER['REQUEST_METHOD'] == "POST") {
                dbProcessConfig();
                transitionNextStep();
                redirectSelf();
            }
        }
<?php

/**
 * File: boot.php
 * User: zacharydubois
 * Date: 2015-12-28
 * Time: 20:38
 * Project: Digital-Footprint-Profile
 */
require APP . 'inc' . DS . 'Checks.php';
if (!phpVersionCheck()) {
    header("Content-Type: text/plain");
    echo "You need at least PHP 5.5 to run this.";
    die;
}
if (!composerCheck()) {
    header("Content-Type: text/plain");
    echo "You did not complete the installation process. Composer dependencies were not installed.";
    die;
}
if (!configured()) {
    header("Content-Type: text/plain");
    echo "Digital Footprint Profile has not been configured yet. Please run the configuration script.";
    die;
}
/*
 * Load the app.
 */
require APP . 'load.php';
require APP . 'controller' . DS . 'Run.php';
use dfp\Run;