Skip to content

Commit

Permalink
Fixed #653. Support for command line requests in addition to lighthtt…
Browse files Browse the repository at this point in the history
…pd and nginx routing for install.
  • Loading branch information
xeoncross committed Feb 10, 2014
1 parent 4ff1c70 commit 40654e6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions index.php
Expand Up @@ -7,6 +7,9 @@
* file that was distributed with this source code.
*/

// CLI/Nginx/Cron: We need to set the "current working directory" to this folder
chdir(dirname(__FILE__));

// vendors not installed
if(!is_dir(__DIR__ . '/vendor'))
{
Expand Down
2 changes: 1 addition & 1 deletion install/engine/step_2.php
Expand Up @@ -139,7 +139,7 @@ private static function defineConstants()
// define constants
if(!defined('PATH_WWW'))
{
define('PATH_WWW', dirname(realpath($_SERVER['SCRIPT_FILENAME'])));
define('PATH_WWW', getcwd());
}

if(!defined('PATH_LIBRARY'))
Expand Down
4 changes: 4 additions & 0 deletions install/index.php
@@ -0,0 +1,4 @@
<?php

// If the .htaccess rule doesn't work (nginx) then manually load the index
require(__DIR__ . '/../index.php');

0 comments on commit 40654e6

Please sign in to comment.