3

I'm trying to make PhpStorm Command Line Tools Console work with Composer and Laravel on my computer running Windows.

So here is what I did :

  • Installed WAMP
  • Configured PHPStorm php interpreter path
  • Installed Composer using Composer-Setup.exe (So my PATH vars are set).
  • Enabled php_openssl mod in CLI.

Eveything works fine in command line, both native and cygwin.

But when I try to make a composer update from PhpStorm Command Line Tools Console I get the following RuntimeException (in french):

[RuntimeException]                                                  
Error Output: 'php' n'est pas reconnu en tant que commande interne  
ou externe, un programme ex�cutable ou un fichier de commandes.

Wich translated in english gives us:

[RuntimeException]
Error Output: 'php' not recognized as an internal or external command,
operable program or batch file.

But php work perfectly in command line:

C:\Users\Me>php -v
PHP 5.4.12 (cli) (built: Feb 25 2013 00:29:22)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

Does anyone has a clue on how to make this work ?

Anshad Vattapoyil
  • 23,145
  • 18
  • 84
  • 132
Korri
  • 657
  • 7
  • 22
  • This might be a PhpStorm issue, not laravel's nor composer's. I'd search for: PhpStorm php not recognized as command – Blue Genie Jul 18 '13 at 20:39
  • 3
    Restart your PC so PATH environment variable will be properly updated for ALL processes (especially if you have installed WAMP while having PhpStorm running). This is not actually PhpStorm issue, rather how Windows OS works. Similar kind of issues you may have on Mac or Linux, when something that configured and works in bash console does not work in PhpStorm -- IDE does not read/uses bash config files... – LazyOne Jul 18 '13 at 21:48

1 Answers1

2

As LazyOne said, I just needed to restart my computer so that the PATH environment would be updated (Actually restarting the concerned processes was enough).

Adrian Pronk
  • 13,486
  • 7
  • 36
  • 60
Korri
  • 657
  • 7
  • 22