basic checks

This commit is contained in:
Milos Stojanovic
2019-06-14 14:49:20 +02:00
parent 55bc3a34bb
commit 2cf25c69e4

22
dist/index.php vendored
View File

@@ -9,14 +9,36 @@
* file that was distributed with this source code.
*/
if (version_compare(PHP_VERSION, '7.1.3', '<')) {
echo 'Minimum requirement is PHP 7.1.3. You are using: '.PHP_VERSION."\n";
die;
}
if (! is_writable(__DIR__.'/../private/logs/')) {
echo 'Folder not writable: /private/logs/'."\n";
die;
}
if (! is_writable(__DIR__.'/../private/tmp/')) {
echo 'Folder not writable: /private/tmp/'."\n";
die;
}
if (! is_writable(__DIR__.'/../repository/')) {
echo 'Folder not writable: /repository/'."\n";
die;
}
require __DIR__.'/../vendor/autoload.php';
if (! defined('APP_ENV')) {
define('APP_ENV', 'production');
}
if (! defined('APP_PUBLIC_PATH')) {
define('APP_PUBLIC_PATH', '');
}
define('APP_PUBLIC_DIR', __DIR__);
define('APP_VERSION', '7.0.0');