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.
This commit is contained in:
David Lin 2013-02-27 08:54:57 +08:00
parent 2e8b5575e5
commit 5929f8e537
1 changed files with 2 additions and 2 deletions

View File

@ -196,7 +196,7 @@ public static function time()
*/
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'));
}
/**