Adrian Wiik
Adrian Wiik

Reputation: 489

'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16

enter image description here

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_php\php.exe -S localhost:80 -t C:\path_to_my_project\www
[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?

Upvotes: 1

Views: 15458

Answers (5)

rachidFront Dev
rachidFront Dev

Reputation: 41

I 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 to vcruntime140_backup.dll under the folder

C:\Windows\System32

second thing is go to this folder path for example C:\xampp\mysql\bin search for the same file vcruntime140.dll

copy & paste into this folder path:

 C:\Windows\System32

Upvotes: 0

paradizex
paradizex

Reputation: 11

I am using XAMP and the below worked for me

I renamed the file vcruntime140.dll to vcruntime140_old.dll under the folder

C:\xampp\apache\bin

Upvotes: 1

hubnotch
hubnotch

Reputation: 41

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++

Upvotes: 0

Mauricio Molina
Mauricio Molina

Reputation: 250

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 :

  1. open the directory C:\Program Files\JetBrains\PhpStorm 2019.3.1\jbr\bin and
  2. then renamed the file vcruntime140.dll to vcruntime140.dll.old
  3. Restart PhpStorm

It works like a charm

Upvotes: 4

Adrian Wiik
Adrian Wiik

Reputation: 489

Looks like I had Microsoft Visual C++ 2017 Redistributable installed alongside Microsoft Visual C++ 2015-2019 Redistributable. When I uninstalled the 2017 version, PHP started playing nicely. Hope this helps people in the same situation!

Upvotes: 3

Related Questions