fixes so cli installs/upgrades work.

Also another step along the way allowing freeswitch to run -u -g freeswitch and fusionpbx to run -u -g www-data
This commit is contained in:
Harry G. Coin
2016-04-25 21:26:26 -05:00
parent 1497c7cb7e
commit fd313a7c66
68 changed files with 274 additions and 72 deletions
+9 -6
View File
@@ -25,14 +25,17 @@
*/
//check the permission
if(defined('STDIN')) {
$document_root = str_replace("\\", "/", $_SERVER["PHP_SELF"]);
preg_match("/^(.*)\/core\/.*$/", $document_root, $matches);
$document_root = $matches[1];
set_include_path($document_root);
require_once "resources/require.php";
$_SERVER["DOCUMENT_ROOT"] = $document_root;
// $document_root = str_replace("\\", "/", $_SERVER["PHP_SELF"]);
// preg_match("/^(.*)\/core\/.*$/", $document_root, $matches);
// $document_root = $matches[1];
// set_include_path($document_root);
$format = 'text'; //html, text
include "root.php";
require_once "resources/require.php";
// $_SERVER["DOCUMENT_ROOT"] = $document_root;
}
else {
include "root.php";