From 3f9ce5bf868ace1df055e1b1cae0616bdd4fb708 Mon Sep 17 00:00:00 2001 From: Luis Daniel Lucio Quiroz Date: Tue, 7 Feb 2017 23:32:39 -0500 Subject: [PATCH] SCRIPTS: PHP bin is not always php5 (#2352) --- app/scripts/resources/classes/scripts.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/scripts/resources/classes/scripts.php b/app/scripts/resources/classes/scripts.php index a492f45e01..feccafb3a2 100644 --- a/app/scripts/resources/classes/scripts.php +++ b/app/scripts/resources/classes/scripts.php @@ -213,8 +213,11 @@ if (!class_exists('scripts')) { if (substr(strtoupper(PHP_OS), 0, 3) == "WIN") { $tmp .= " php_bin = \"php.exe\";\n"; } + elseif (file_exists(PHP_BINDIR."/php5")) { + $tmp .= " php_bin = \"php5\";\n"; + } else { - $tmp .= " php_bin = \"php5\";\n"; + $tmp .= " php_bin = \"php\";\n"; } $tmp .= $this->correct_path(" document_root = [[".$_SERVER["DOCUMENT_ROOT"].PROJECT_PATH."]];\n"); $tmp .= $this->correct_path(" project_path = [[".PROJECT_PATH."]];\n");