I have an error when I start PHP 7 on Windows. When I run php
on the command line, it returns a message box with system error:
The program can't start because VCRUNTIME140.dll is missing from your computer. Try reinstalling the program to fix this problem.
After that, CLI
is crashing.
As I don't want to install a DLL file from an external website, I don't know how to fix this!
PHP version: 7.0.0alpha1 VC14 x64 Thread Safe
I had same problem when installing Robot Framework 2.9.2 using the Windows installer version on Windows 7.
I could solve it installing the VC14 builds require to have the "Visual C++ Redistributable for Visual Studio 2015 x86 or x64 installed" from Microsoft website.
I got same error and found that my Microsoft Visual C++ is 32 bit and Windows is 64 bit. I tried to install WAMP 7 32 bit and the problem was solved.
Maybe we need to install WAMP 32 bit if Visual Studio is 32 bit. And vice versa.
For things like this, you don't blindly keep clicking 'Next', 'Next', and 'I Agree'.
WAMP informs you about this during and before installation:
The MSVC runtime libraries VC9, VC10, VC11 are required for Wampserver 2.4, 2.5 and 3.0, even if you use only Apache and PHP versions with VC11. Runtimes VC13, VC14 is required for PHP 7 and Apache 2.4.17
VC9 Packages (Visual C++ 2008 SP1) http://www.microsoft.com/en-us/download/details.aspx?id=5582 http://www.microsoft.com/en-us/download/details.aspx?id=2092
VC10 Packages (Visual C++ 2010 SP1) http://www.microsoft.com/en-us/download/details.aspx?id=8328 http://www.microsoft.com/en-us/download/details.aspx?id=13523
VC11 Packages (Visual C++ 2012 Update 4) The two files VSU4\vcredist_x86.exe and VSU4\vcredist_x64.exe to be download are on the same page: http://www.microsoft.com/en-us/download/details.aspx?id=30679
VC13 Packages] (Visual C++ 2013[) The two files VSU4\vcredist_x86.exe and VSU4\vcredist_x64.exe to be download are on the same page: https://www.microsoft.com/en-us/download/details.aspx?id=40784
VC14 Packages (Visual C++ 2015) The two files vcredist_x86.exe and vcredist_x64.exe to be download are on the same page: http://www.microsoft.com/en-us/download/details.aspx?id=48145
You must install both 32 and 64bit versions, even if you do not use Wampserver 64 bit.
IMPORTANT NOTE: Be sure to to run all Microsoft Visual C++ installations with administrator privileges (right click ? Run as Administrator). Just missing this small step wasted my entire day.
Visual C++ Redistributable for Visual Studio 2015 (x32 bit version) - RC.
This should correct that. You can google for what the DLL is, but that's not important.
PS: It's officially from Microsoft too:)
Where I found it: Downloads (Visual Studio)
If you've followed Adam's instructions and you're still getting this error make sure you've installed the right variants (x86 or x64).
I had VC14x64 with PHP7x86 and I still got this error. Changing PHP7 to x64 fixed it. It's easy to miss you accidentally installed the wrong version.
Installing vc_redist.x86.exe works for me even though you have a 64-bit machine.
Usually this is an error in your PHP configuration.
It's actually pretty easy to figure out what exactly is going on:
Source: Stackoverflow.com