MrJalapeno
MrJalapeno

Reputation: 1662

php cli has stopped working

I have a fresh windows 8 installation:

Downloaded php-(5.6.11 zip) from this this page:
Unzipped it to "C:\Users\patrick\php".

Don't know if this is important:
Copied and renamed php.ini-development to php.ini.
Changed display_errors from off to on.

Added "C:\Users\patrick\php" to my Environment Variable Path.
Started Windows PowerShell.
Typed in "php -S localhost:8000"
"CLI has stopped working" pops up with no more information.

(OBS: Doesn't matter what I type in after "php", same message pops up)

Similar but not exactly the same Stack Overflow questions:
PHP 5.3.0 as distributed in a xampp 1.7.2 .zip
Solved by updating his PHP version bundled with xampp. Since I don't run my php with xampp yet I'm not sure how I would go about doing this.

updated Wamp to PHP 5.4.3 from 5.3.8.
Not solved but suggested he should not have installed WAMP into Program files, some bits of Apache and PHP dont like having spaces in folder names. This shouldn't be an issue with "C:\Users\patrick\php" right?

There are a few other php-related "CLI has stopped working" problems, but all of the ones I found only occurred in specific events, such as "When I use this function..." etc.


Using Process Monitor, I've found that the php.exe process keeps looking for a DLL file in all my Path folders:

enter image description here

Upvotes: 4

Views: 2177

Answers (1)

Mathias R. Jessen
Mathias R. Jessen

Reputation: 175085

As we've established, the php.exe executable tries to locate a library called MSVCR110.dll on startup.

MSVCR110 stands for Microsoft Visual C++ Runtime 11.0.

This runtime library is part of the Visual C++ Redistributable packages that comes with Visual Studio, and that you can download and install on it's own from Microsoft - they even maintain a list of download links in KB2977003.

You'll want the Visual Studio 2012 version (corresponds to VC++ version 11.0).

Once installed, it'll also update the path env variable, and php.exe should then be able to locate it on startup

Upvotes: 5

Related Questions