[index] Add check for correct PHP version
This commit is contained in:
parent
8924722b93
commit
3bcd98404b
1 changed files with 8 additions and 1 deletions
|
@ -10,6 +10,9 @@ TODO :
|
||||||
- implement header('X-Cached-Version: '.date(DATE_ATOM, filemtime($cachefile)));
|
- implement header('X-Cached-Version: '.date(DATE_ATOM, filemtime($cachefile)));
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Defines the minimum required PHP version for RSS-Bridge
|
||||||
|
define('PHP_VERSION_REQUIRED', '5.6.0');
|
||||||
|
|
||||||
//define('PROXY_URL', 'tcp://192.168.0.0:28');
|
//define('PROXY_URL', 'tcp://192.168.0.0:28');
|
||||||
// Set to true if you allow users to disable proxy usage for specific bridges
|
// Set to true if you allow users to disable proxy usage for specific bridges
|
||||||
define('PROXY_BYBRIDGE', false);
|
define('PROXY_BYBRIDGE', false);
|
||||||
|
@ -50,6 +53,10 @@ if(file_exists('DEBUG')){
|
||||||
|
|
||||||
require_once __DIR__ . '/lib/RssBridge.php';
|
require_once __DIR__ . '/lib/RssBridge.php';
|
||||||
|
|
||||||
|
// Check PHP version
|
||||||
|
if(version_compare(PHP_VERSION, PHP_VERSION_REQUIRED) === -1)
|
||||||
|
die('RSS-Bridge requires at least PHP version ' . PHP_VERSION_REQUIRED . '!');
|
||||||
|
|
||||||
// extensions check
|
// extensions check
|
||||||
if(!extension_loaded('openssl'))
|
if(!extension_loaded('openssl'))
|
||||||
die('"openssl" extension not loaded. Please check "php.ini"');
|
die('"openssl" extension not loaded. Please check "php.ini"');
|
||||||
|
@ -126,7 +133,7 @@ try {
|
||||||
}
|
}
|
||||||
|
|
||||||
$params = $_GET;
|
$params = $_GET;
|
||||||
|
|
||||||
// Initialize cache
|
// Initialize cache
|
||||||
$cache = Cache::create('FileCache');
|
$cache = Cache::create('FileCache');
|
||||||
$cache->setPath(CACHE_DIR);
|
$cache->setPath(CACHE_DIR);
|
||||||
|
|
Loading…
Reference in a new issue