I’m trying to get PHP 7.4.1 (NTS x64, Zip version) to run on my Windows development machine, but I’m getting the following output in my run window in PhpStorm:
C:path_to_phpphp.exe -S localhost:80 -t C:path_to_my_projectwww
[Tue Dec 31 15:42:39 2019] PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0
Process finished with exit code 1
I’ve done some research on the problem and found this existing question that suggests installing the latest Microsoft Visual C++ Redistributable for Visual Studio 2019 found here. I installed the latest x64 version and restarted my computer but to no avail, I still get the exact same error message. I have also tried running the installer again and done a repair+restart, but that didn’t help either.
Running php -i
in the command line works flawlessly, and displays the configuration info for PHP 7.4.1, which is the same PHP instance I’m trying to run in PhpStorm.
The same problem occurs with PHP 7.4, but PHP 7.3 works like a charm.
I’m at a loss. Has anyone had the same problem, and found a solution?
5
Answers
Looks like I had
Microsoft Visual C++ 2017 Redistributable
installed alongsideMicrosoft Visual C++ 2015-2019 Redistributable
. When I uninstalled the 2017 version, PHP started playing nicely. Hope this helps people in the same situation!As @Daniel Opitz commented on 14th Jan, the problem was, that PhpStorm is getting shipped with an old or wrong version of
vcruntime140.dll
.To fix this error I had to :
vcruntime140.dll
tovcruntime140.dll.old
It works like a charm
php needs The latest supported Visual C++ to run.
I solved the problem in my pc by downloading The latest supported Visual C++. here is the linklatest supported Visual C++
I am using XAMP and the below worked for me
I renamed the file
vcruntime140.dll
tovcruntime140_old.dll
under the folderI am using XAMPP and the below worked for me
without installed any version of Microsoft Visual C++ 2017 Redistributable
I renamed the file
vcruntime140.dll
tovcruntime140_backup.dll
under the foldersecond thing is go to this folder path for example
C:xamppmysqlbin
search for the same filevcruntime140.dll
copy & paste into this folder path: