diff --git a/dist/index.php b/dist/index.php index e73be0d..9a8c0a6 100644 --- a/dist/index.php +++ b/dist/index.php @@ -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');