Laravel Unhandled Exception Undefined index: argv on core.php line 218 [duplicate]-Collection of common programming errors
I like to think my Google-fu skills are fairly decent, but I cannot find a solution to this particular issue. I am running laravel on my dev box on my local server. I am running nginx, PHP Version 5.4.6-1 on a Debian Mint machine.
When I point my browser to my local box, I am getting the following error message:
Unhandled Exception
Message:
Undefined index: argv
Location:
/var/www/laravel/laravel/core.php on line 218
That particular snippet of code looks as follows:
/*
|--------------------------------------------------------------------------
| Set The CLI Options Array
|--------------------------------------------------------------------------
|
| If the current request is from the Artisan command-line interface, we
| will parse the command line arguments and options and set them the
| array of options in the $_SERVER global array for convenience.
|
*/
if (Request::cli())
{
$console = CLI\Command::options($_SERVER['argv']);
list($arguments, $options) = $console;
$options = array_change_key_case($options, CASE_UPPER);
$_SERVER['CLI'] = $options;
}
Any suggestions out there on how I might go about resolving this particularly annoying issue? Thanks!
-
Thanks Mario for the heads up, didn’t think the problem was a PHP configuration setting, now I know to look into it from a broader perspective. I found the setting and toggled it over on the php.ini. I restarted the php service (since it runs separate from nginx, unlike Apache) and it worked like a charm.
Originally posted 2013-11-27 12:09:16.