1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 13:30:55 +01:00

Add support for a PHUTIL_LIBRARY_ROOT variable in $_SERVER to make

it easeir to build Phabricator for hphp.
This commit is contained in:
epriestley 2011-02-25 18:58:37 -08:00
parent 3c736744e9
commit d4bd2b0edd

View file

@ -19,11 +19,6 @@
error_reporting(E_ALL | E_STRICT); error_reporting(E_ALL | E_STRICT);
$env = getenv('PHABRICATOR_ENV'); // Apache $env = getenv('PHABRICATOR_ENV'); // Apache
if (!$env) {
if (isset($_SERVER['PHABRICATOR_ENV'])) {
$env = $_SERVER['PHABRICATOR_ENV']; // HipHop
}
}
if (!$env) { if (!$env) {
phabricator_fatal_config_error( phabricator_fatal_config_error(
@ -143,8 +138,13 @@ function setup_aphront_basics() {
$aphront_root = dirname(dirname(__FILE__)); $aphront_root = dirname(dirname(__FILE__));
$libraries_root = dirname($aphront_root); $libraries_root = dirname($aphront_root);
$root = null;
if (!empty($_SERVER['PHUTIL_LIBRARY_ROOT'])) {
$root = $_SERVER['PHUTIL_LIBRARY_ROOT'];
}
ini_set('include_path', $libraries_root.':'.ini_get('include_path')); ini_set('include_path', $libraries_root.':'.ini_get('include_path'));
@include_once 'libphutil/src/__phutil_library_init__.php'; @include_once $root.'libphutil/src/__phutil_library_init__.php';
if (!@constant('__LIBPHUTIL__')) { if (!@constant('__LIBPHUTIL__')) {
echo "ERROR: Unable to load libphutil. Update your PHP 'include_path' to ". echo "ERROR: Unable to load libphutil. Update your PHP 'include_path' to ".
"include the parent directory of libphutil/.\n"; "include the parent directory of libphutil/.\n";