Commit 5929f8e5 authored by David Lin's avatar David Lin

Update laravel/request.php

When running nginx with php-cgi (Fast-CGI): 

spawn-fcgi -a 127.0.0.1 -p 10081 -C 50 -u nobody -f /usr/local/php5317/bin/php-cgi

The Request::cli() method will determine the web request as run from the command line.
Add ` PHP_SAPI != "cgi-fcgi" ` to resolve it.
parent 2e8b5575
......@@ -196,7 +196,7 @@ class Request {
*/
public static function cli()
{
return defined('STDIN') || (substr(PHP_SAPI, 0, 3) == 'cgi' && getenv('TERM'));
return defined('STDIN') || (PHP_SAPI != "cgi-fcgi" && substr(PHP_SAPI, 0, 3) == 'cgi' && getenv('TERM'));
}
/**
......@@ -287,4 +287,4 @@ class Request {
return call_user_func_array(array(static::foundation(), $method), $parameters);
}
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment