Permalink
Browse files

Support Windows

Test Plan:
Enable setup.
Disable setup.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D2118
  • Loading branch information...
vrana
vrana committed Apr 6, 2012
1 parent 426d6f2 commit 23988ca482d1c36e8423b4d9933858c8029382d4
Showing with 12 additions and 9 deletions.
  1. +4 −2 scripts/__init_env__.php
  2. +3 −4 scripts/__init_script__.php
  3. +2 −2 src/infrastructure/setup/PhabricatorSetup.php
  4. +3 −1 webroot/index.php
View
@@ -1,7 +1,7 @@
<?php
/*
- * Copyright 2011 Facebook, Inc.
+ * Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,9 @@
*/
$include_path = ini_get('include_path');
-ini_set('include_path', $include_path.':'.dirname(__FILE__).'/../../');
+ini_set(
+ 'include_path',
+ $include_path.PATH_SEPARATOR.dirname(__FILE__).'/../../');
require_once dirname(dirname(__FILE__)).'/conf/__init_conf__.php';
@@ -20,7 +20,9 @@
ini_set('display_errors', 1);
$include_path = ini_get('include_path');
-ini_set('include_path', $include_path.':'.dirname(__FILE__).'/../../');
+ini_set(
+ 'include_path',
+ $include_path.PATH_SEPARATOR.dirname(__FILE__).'/../../');
@include_once 'libphutil/scripts/__init_script__.php';
if (!@constant('__LIBPHUTIL__')) {
echo "ERROR: Unable to load libphutil. Update your PHP 'include_path' to ".
@@ -34,9 +36,6 @@
// are not vulnerable to CSRF.
AphrontWriteGuard::allowDangerousUnguardedWrites(true);
-$include_path = ini_get('include_path');
-ini_set('include_path', $include_path.':'.dirname(__FILE__).'/../../');
-
require_once dirname(dirname(__FILE__)).'/conf/__init_conf__.php';
$env = isset($_SERVER['PHABRICATOR_ENV'])
@@ -233,8 +233,8 @@ public static function runSetup() {
// unreasonable and we don't need it from Apache, so do an explicit test
// for CLI availability.
list($err, $stdout, $stderr) = exec_manual(
- '%s/scripts/setup/pcntl_available.php',
- $root);
+ 'php %s',
+ "{$root}/scripts/setup/pcntl_available.php");
if ($err) {
self::writeFailure();
self::write("Unable to execute scripts/setup/pcntl_available.php to ".
View
@@ -198,7 +198,9 @@ function setup_aphront_basics() {
$root = $_SERVER['PHUTIL_LIBRARY_ROOT'];
}
- ini_set('include_path', $libraries_root.':'.ini_get('include_path'));
+ ini_set(
+ 'include_path',
+ $libraries_root.PATH_SEPARATOR.ini_get('include_path'));
@include_once $root.'libphutil/src/__phutil_library_init__.php';
if (!@constant('__LIBPHUTIL__')) {
echo "ERROR: Unable to load libphutil. Put libphutil/ next to ".

0 comments on commit 23988ca

Please sign in to comment.