Skip to content

Commit

Permalink
Merge pull request #282 from Contentify/additonal-setup-info
Browse files Browse the repository at this point in the history
Improved installation information
  • Loading branch information
chriskonnertz committed Jan 23, 2018
2 parents 8081ed4 + 3bfce64 commit d30507e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
9 changes: 5 additions & 4 deletions contentify/Controllers/InstallController.php
Expand Up @@ -38,8 +38,9 @@ public function index($step = -1, $errors = null)
}

$filename = storage_path(self::INSTALL_FILE);
$filename = str_replace(base_path(), '', $filename); // Make the path relative
if (file_exists($filename)) {
die('Contentify has been installed already. Remove this file if you want to reinstall it: '.$filename);
die('Contentify has been installed already. Remove this file if you want to reinstall it: ...'.$filename);
}

if ($step < 0) {
Expand Down Expand Up @@ -1123,7 +1124,7 @@ protected function createPivot($tableName, Closure $tableRows, $primaryKeys = ar
$table->engine = 'InnoDB'; // Since we create the table here we ensure InnoDB is the storage engine

/*
* Add the primarey keys:
* Add the primary keys:
*/
foreach ($primaryKeys as $primaryKey) {
$table->integer($primaryKey)->unsigned();
Expand Down Expand Up @@ -1168,9 +1169,9 @@ protected function createDefaultCategories($tables, $withSlug = false)
}

/**
* The installer will send some infos that are supposed to help understanding
* The installer will send some info that are supposed to help understanding
* the usage of the CMS. Of course no sensible information will be sent!
* Infos sent: Time and version of the CMS and of PHP. That's all.
* Info sent: Time and version of the CMS and of PHP. That's all.
* Check the code if you do not trust this statement.
*
* @return void
Expand Down
15 changes: 15 additions & 0 deletions public/install.php
Expand Up @@ -59,7 +59,22 @@ public function run()
$this->line("Directory '$dir': ".$this->red('Not writable'));
}
}

$this->line();

$apacheSig = 'Apache/';
if (substr($_SERVER['SERVER_SOFTWARE'], 0, strlen($apacheSig)) === $apacheSig) {
$this->line('Webserver: '.$this->green('Apache'));

$modRewrite = in_array('mod_rewrite', apache_get_modules());
if ($modRewrite) {
$this->line('mod_rewrite enabled: '.$this->green('Yes'));
} else {
$this->line('mod_rewrite enabled: '.$this->red('No - please enable it via "sudo a2enmod rewrite"!'));
}

$this->line();
}
}

/**
Expand Down

0 comments on commit d30507e

Please sign in to comment.