0

I just installed PHP7 on my windows 10 machine from here (the thread safe 64 bit version) http://windows.php.net/download#php-7.0

I manually set the path to the php folder and set up the php.ini. Whenever I want to use the php command it just goes into the next line without doing anything. It doesn't even matter what arguments I type in. There is no error message so I am clueless on what could be the problem.

Here is what happens:

PS C:\Users\Jakob> php
PS C:\Users\Jakob> php cjasdf
PS C:\Users\Jakob>

Even if i navigate into the php folder and execute the php.exe nothing happens as well:

PS C:\php> .\php.exe
PS C:\php> .\php.exe aleass
PS C:\php>
Jakob Abfalter
  • 4,980
  • 17
  • 54
  • 94

1 Answers1

1

RE: Your comment about a missing Visual C/C++ runtime library

The first thing you need to do is update Windows with that runtime library Download it from here

Ok Power Shell is A completely different beast to the command prompt and all the usual DOS commands are replaced with PS commands

I got PHP to run in Power Shell like this

Running PHP by switching into the folder where PHP is installed

 PS > Set-Location c:\php
 PS > php -v

And here is how I would do it better, by adding the C:\php folder to the PATH, but only for the duration of the PS Windows instance i.e. not a permanant change to the Windows PATH

Add your PHP folder to the WINDOWS PATH for the duration of this PS execution

PS > $ENV:Path = $ENV:Path + ";c:\php"

The CD (or the PS equivalent) into the folder containing your PHP CLI scripts

PS > Set-Location c:\php-source
PS > php test.php

Thanks, I have never used Power Shell before and finding this simple stuff out made me think I should spend some time learning more about it.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • This may also help if you insist on using PS http://stackoverflow.com/questions/714877/setting-windows-powershell-path-variable – RiggsFolly Jan 26 '16 at 11:47