From 8ef115e8c38f0cef52a72749a918ebb4def389d0 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 5 Sep 2016 18:13:49 +0200 Subject: Rename install.php to check_deps.php Signed-off-by: Florian Pritz --- INSTALL | 2 +- check_deps.php | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ install.php | 85 ---------------------------------------------------------- 3 files changed, 86 insertions(+), 86 deletions(-) create mode 100644 check_deps.php delete mode 100644 install.php diff --git a/INSTALL b/INSTALL index d4f46da45..5df257eed 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ # Configuration -* run install.php to make sure all dependencies are installed +* run check_deps.php to make sure all dependencies are installed - if you are only creating a basic development installation you will only need: pygmentize (part of pygments) diff --git a/check_deps.php b/check_deps.php new file mode 100644 index 000000000..f8d2da2db --- /dev/null +++ b/check_deps.php @@ -0,0 +1,85 @@ +&1", $buf); +ob_end_clean(); +if ($buf != "0") { + $errors .= " - Error when testing pygmentize: Return code was \"$buf\".\n"; +} + +// test ansi2html +ob_start(); +passthru("ansi2html -h 2>&1", $buf); +ob_end_clean(); +if ($buf != "0") { + $errors .= " - Error when testing ansi2html: Return code was \"$buf\".\n"; +} + +// test imagemagick +ob_start(); +passthru("convert --version 2>&1", $buf); +ob_end_clean(); +if ($buf != "0") { + $errors .= " - Error when testing imagemagick (convert): Return code was \"$buf\".\n"; +} + +// test composer +ob_start(); +passthru("composer --version 2>&1", $buf); +ob_end_clean(); +if ($buf != "0") { + $errors .= " - Error when testing composer: Return code was \"$buf\".\n"; +} + +// test PHP modules +$mod_groups = array( + "thumbnail generation - GD" => array("gd"), + "thumbnail generation - EXIF" => array("exif"), + "database support" => array("mysql", "mysqli", "pgsql", "pdo_mysql", "pdo_pgsql"), + "multipaste tarball support" => array("phar"), +); +foreach ($mod_groups as $function => $mods) { + $found = 0; + foreach ($mods as $module) { + if (extension_loaded($module)) { + $found++; + } + } + if ($found == 0) { + $errors .= " - none of the modules needed for $function are loaded. Make sure to load at least one of these: ".implode(", ", $mods)."\n"; + } +} + + +if ($errors != "") { + echo "Errors occured:\n"; + echo $errors; +} else { + echo "Dependency checks completed sucessfully.\n"; +} diff --git a/install.php b/install.php deleted file mode 100644 index f8d2da2db..000000000 --- a/install.php +++ /dev/null @@ -1,85 +0,0 @@ -&1", $buf); -ob_end_clean(); -if ($buf != "0") { - $errors .= " - Error when testing pygmentize: Return code was \"$buf\".\n"; -} - -// test ansi2html -ob_start(); -passthru("ansi2html -h 2>&1", $buf); -ob_end_clean(); -if ($buf != "0") { - $errors .= " - Error when testing ansi2html: Return code was \"$buf\".\n"; -} - -// test imagemagick -ob_start(); -passthru("convert --version 2>&1", $buf); -ob_end_clean(); -if ($buf != "0") { - $errors .= " - Error when testing imagemagick (convert): Return code was \"$buf\".\n"; -} - -// test composer -ob_start(); -passthru("composer --version 2>&1", $buf); -ob_end_clean(); -if ($buf != "0") { - $errors .= " - Error when testing composer: Return code was \"$buf\".\n"; -} - -// test PHP modules -$mod_groups = array( - "thumbnail generation - GD" => array("gd"), - "thumbnail generation - EXIF" => array("exif"), - "database support" => array("mysql", "mysqli", "pgsql", "pdo_mysql", "pdo_pgsql"), - "multipaste tarball support" => array("phar"), -); -foreach ($mod_groups as $function => $mods) { - $found = 0; - foreach ($mods as $module) { - if (extension_loaded($module)) { - $found++; - } - } - if ($found == 0) { - $errors .= " - none of the modules needed for $function are loaded. Make sure to load at least one of these: ".implode(", ", $mods)."\n"; - } -} - - -if ($errors != "") { - echo "Errors occured:\n"; - echo $errors; -} else { - echo "Dependency checks completed sucessfully.\n"; -} -- cgit v1.2.3-24-g4f1b