Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mevdschee committed Oct 26, 2018
1 parent 5d4770c commit 06714df
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions requirements.php
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<?php
if (!defined('PHP_VERSION_ID')) {
$version = explode('.', PHP_VERSION);
define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
$version = explode('.', PHP_VERSION);
define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
}
if (PHP_VERSION_ID < 50300) {
echo "ERROR: PHP 5.3 or higher required\n";
exit(1);
echo "ERROR: PHP 5.3 or higher required\n";
exit(1);
}
if (!function_exists('mysqli_connect')) {
echo "ERROR: MySQLi extension not found\n";
exit(1);
echo "ERROR: MySQLi extension not found\n";
exit(1);
}
if (!file_exists('tools/latest.php')) {
echo "INFO: Adminer not found, downloading...\n";
file_put_contents('tools/latest.php',file_get_contents('http://adminer.org/latest.php'));
if (!file_exists('vendor/mindaphp/tools/latest.php')) {
echo "INFO: Adminer not found, downloading...\n";
file_put_contents('vendor/mindaphp/tools/latest.php', file_get_contents('http://adminer.org/latest.php'));
}
if (!file_exists('tools/latest.php')) {
echo "ERROR: Could not write 'tools/latest.php'\n";
exit(1);
if (!file_exists('vendor/mindaphp/tools/latest.php')) {
echo "ERROR: Could not write 'vendor/mindaphp/tools/latest.php'\n";
exit(1);
}
if (!file_exists('composer.phar')) {
echo "INFO: Composer not found, downloading...\n";
file_put_contents('composer.phar',file_get_contents('https://getcomposer.org/composer.phar'));
echo "INFO: Composer not found, downloading...\n";
file_put_contents('composer.phar', file_get_contents('https://getcomposer.org/composer.phar'));
}
if (!file_exists('composer.phar')) {
echo "ERROR: Could not write 'composer.phar'\n";
exit(1);
echo "ERROR: Could not write 'composer.phar'\n";
exit(1);
}
if (!file_exists('phpunit.phar')) {
echo "INFO: PHPUnit not found, downloading...\n";
file_put_contents('phpunit.phar',file_get_contents('https://phar.phpunit.de/phpunit.phar'));
echo "INFO: PHPUnit not found, downloading...\n";
file_put_contents('phpunit.phar', file_get_contents('https://phar.phpunit.de/phpunit.phar'));
}
if (!file_exists('phpunit.phar')) {
echo "ERROR: Could not write 'phpunit.phar'\n";
exit(1);
echo "ERROR: Could not write 'phpunit.phar'\n";
exit(1);
}
exit(0);

0 comments on commit 06714df

Please sign in to comment.