1

I've already checked to see if register_argc_argv is on in my php.ini file (it is) and I'm using PHP-CLI.

This is the error message I get:

PHP Fatal error: Uncaught exception 'ErrorException' with message 'Undefined index: argv' in phar:///var/www/html/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php:57\nStack trace:\n#0 phar:///var/www/html/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php(57): Composer\Util\ErrorHandler::handle(8, 'Undefined index...', 'phar:///var/www...', 57, Array)\n#1 phar:///var/www/html/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(111): Symfony\Component\Console\Input\ArgvInput->__construct()\n#2 phar:///var/www/html/composer.phar/src/Composer/Console/Application.php(83): Symfony\Component\Console\Application->run(NULL, Object(Symfony\Component\Console\Output\ConsoleOutput))\n#3 phar:///var/www/html/composer.phar/bin/composer(43): Composer\Console\Application->run()\n#4 /var/www/html/composer.phar(15): require('phar:///var/www...')\n#5 /var/www/html/db.php(13): require_once('/var/www/html/c...')\n#6 {main}\n thrown in phar:///var/www/html/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php on line 57

1 Answer 1

-3

This is what was causing the error:

foreach (scandir(dirname(__FILE__)) as $filename) {
    $path = dirname(__FILE__) . '/' . $filename;
    if (is_file($path)) {
        require_once $path;
    }
Sign up to request clarification or add additional context in comments.

1 Comment

This doesn't really explain the error at all! Perhaps it makes sense to you, but it won't help anyone else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.