2

So I have a terminal and i am currently sitting in my project root where laravel and artisan sit. I am unable to call php or php artisan in the terminal... I can't do migrations or anything else and not sure what I am missing.

'php' is not recognized as an internal or external command, operable program or batch file.

echoBr00tal
  • 67
  • 1
  • 10
  • Have you seen this? http://stackoverflow.com/questions/8464315/php-exe-is-not-recognized-as-an-internal-or-external-command-operable-program – James Mar 03 '16 at 02:31

1 Answers1

1

You need to add folder with php.exe to your system PATH variable:

  • Go to Control Panel and open the System icon (Start → Control Panel)
  • Go to the Advanced tab
  • Click on the 'Environment Variables' button
  • Look into the 'System Variables' pane
  • Find the Path entry (you may need to scroll to find it)
  • Double click on the Path entry
  • Enter your PHP directory at the end, including ';' before (e.g. ;C:\php)
  • Press OK

Restart your computer to make php artisan commands work.

Alexey Mezenin
  • 158,981
  • 26
  • 290
  • 279
  • This works thanks! Any idea how to make artisan work with wamp mysql? After trying to run a migration I get: [PDOException] SQLSTATE[HY000] [1130] Host 'cpe-184-56-126-15.neo.res.rr.com' is not allowed to connect to this MySQL server. I am guessing I need to change the credentials in my .env file but not sure where to find those in WAMP – echoBr00tal Mar 04 '16 at 00:52
  • I figured it. Thanks! – echoBr00tal Mar 04 '16 at 01:27