From 03e4777832a193cc274ebdfced9940c4e95c6918 Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Mon, 27 Apr 2015 23:50:15 +0000 Subject: [PATCH] Add php_bin and php_dir to the config.lua script. --- core/databases/app_defaults.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/databases/app_defaults.php b/core/databases/app_defaults.php index 1a3a4b7b5b..da512c3dc5 100644 --- a/core/databases/app_defaults.php +++ b/core/databases/app_defaults.php @@ -112,7 +112,7 @@ if ($domains_processed == 1) { } $fout = fopen($config,"w"); $tmp = "\n"; - $tmp .= "--switch directories\n"; + $tmp .= "--set the variables\n"; if (strlen($_SESSION['switch']['sounds']['dir']) > 0) { $tmp .= " sounds_dir = \"".$_SESSION['switch']['sounds']['dir']."\";\n"; } @@ -128,6 +128,13 @@ if ($domains_processed == 1) { if (strlen($_SESSION['switch']['voicemail']['dir']) > 0) { $tmp .= " voicemail_dir = \"".$_SESSION['switch']['voicemail']['dir']."\";\n"; } + $tmp .= " php_dir = \"".PHP_BINDIR."\";\n"; + if (substr(strtoupper(PHP_OS), 0, 3) == "WIN") { + $tmp .= " php_bin = \"php.exe\";\n"; + } + else { + $tmp .= " php_bin = \"php\";\n"; + } $tmp .= "\n"; $tmp .= "--database information\n"; $tmp .= " database = {}\n";