Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Install or Update (First time) - 'mode' not recognised as well as Fatal and Stack trace errors #1208

Closed
ausprog opened this issue Oct 14, 2012 · 3 comments
Labels
Milestone

Comments

@ausprog
Copy link

ausprog commented Oct 14, 2012

Hi, I'm running a windows 7 64bit system, PHP 5.4 (with 5.3 installed, though only 5.4 in system variables) and i have composer on the computer.

However when i try to install my json file (I'm following a tutorial series that got me in this direction) i get this error:

c:\test>composer install
Loading composer repositories with package information
Installing dependencies

  • Installing php-activerecord/php-activerecord (dev-master 6f72eb7)
    Cloning 6f72eb7958e7dd18a85b374ee28477de748acbd8
    'mode' is not recognized as an internal or external command,
    operable program or batch file.

Fatal error: Uncaught exception 'ErrorException' with message 'Undefined offset: 4' in pha
r://C:/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application
.php:852
Stack trace:
#0 phar://C:/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Appli

cation.php(852): Composer\Util\ErrorHandler::handle(8, 'Undefined offse...', 'phar://C:/co
mpo...', 852, Array)
#1 phar://C:/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Appli

cation.php(780): Symfony\Component\Console\Application->getTerminalWidth()
#2 phar://C:/composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Appli

cation.php(113): Symfony\Component\Console\Application->renderException(Object(RuntimeExce
ption), Object(Symfony\Component\Console\Output\StreamOutput))
#3 phar://C:/composer/composer.phar/src/Composer/Console/Application.php(72): Symfony\Comp

onent\Console\Application->run(NULL, Object(Symfony\Component\Console\Output\ConsoleOutput
))
#4 phar://C:/composer/composer.phar/bin/com in phar://C:/composer/composer.phar/vendor/sym

fony/console/Symfony/Component/Console/Application.php on line 852

I've looked through Google for a while now and only 1 person (different language) had the issue that was the same as mine, and while he replied how he fixed it I have no way of really understanding what me means (he simply said another script changed the /Bin in PATH or along those lines). there are a few other posts (very few) that are quite similar, but none really reflect a fix for me. I tried changing back to php 5.3 as per another's fix but that failed to work.

Any ideas on how to fix this would be great. It may have everything to do with 'mode' not being recognized, however Google came back with unrelated results for any queries i used relating to that lead.

Hope someone has an idea.
Kind Regards

@Seldaek
Copy link
Member

Seldaek commented Oct 15, 2012

This is a bug in the Symfony Console - see symfony/symfony#5755 for the fix. Once it's merged I'll pull the changes in composer. In the meantime I'm not sure what you can do except fix your PATH environment variable so that "mode" is accessible (most likely C:\Windows\system32 is missing from your PATH).

fabpot added a commit to symfony/symfony that referenced this issue Oct 15, 2012
This PR was merged into the 2.1 branch.

Commits
-------

cf1e02d [Console] Fix error when mode is not in PATH

Discussion
----------

[Console] Fix error when mode is not in PATH

Small bugfix, fixes composer/composer#1208
@Seldaek
Copy link
Member

Seldaek commented Oct 16, 2012

Ok the fix has been merged, if you run composer self-update this should now work fine.

@Seldaek Seldaek closed this as completed Oct 16, 2012
@ausprog
Copy link
Author

ausprog commented Oct 17, 2012

Fantastic, thanks for the support and helping me fix it up :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants