Once I download composer to my remote web host. I try to run the command "php composer.phar install"
Once I run this command like it says in the documentation, I get errors like no tomorrow.
nwrepai1@******** [~/public_html]# php composer.phar install
Content-type: text/html
<br />
<b>Fatal error</b>: Uncaught exception 'ErrorException' with message 'Undefined index: argv' in phar:///home3/nwrepai1/public_html/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php:57
Stack trace:
#0 phar:///home3/nwrepai1/public_html/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php(57): Composer\Util\ErrorHandler::handle(8, 'Undefined index...', 'phar:///home3/n...', 57, Array)
#1 phar:///home3/nwrepai1/public_html/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(98): Symfony\Component\Console\Input\ArgvInput->__construct()
#2 phar:///home3/nwrepai1/public_html/composer.phar/src/Composer/Console/Application.php(74): Symfony\Component\Console\Application->run(NULL, Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 phar:///home3/nwrepai1/public_html/composer.phar/bin/composer(37): Composer\Console\Application->run()
#4 /home3/nwrepai1/public_html/composer.phar(14): require('phar:///home3/n...')
#5 {main}
thrown in <b>phar:///home3/nwrepai1/public_html/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php</b> on line <b>57</b><br />
nwrepai1@********* [~/public_html]#
Is there anything that I am missing on this?
I had the same issue on my shared hosting. It didn't work after I set register_argc_argv=On.
But when I tried "php-cli composer.phar" instead of "php composer.phar" in the shell, it worked.
You need to make sure register_argc_argv=on
is set in your php.ini for the CLI.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With