vcruntime140.dll 14.0 not compatible with PHP build
PhpWindows Server-2016VcredistPhp Problem Overview
I have downloaded PHP 7.4.1 NTS vc15 x86 on a windows server 2016 machine. I also downloaded and installed vc_redist.x86.exe
.
When I try and run php-cgi from the command prompt I get the following error:
> PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP > build linked with 14.16 in Unknown on line 0
Any ideas on how to resolve this? I guess I could install an older version of PHP from the archives but this doesn't really address the problem.
Php Solutions
Solution 1 - Php
Turns out PHP 7.4.x requires Microsoft Visual C++ Redistributable for Visual Studio 2019 which can be downloaded here under the heading Other Tools and Frameworks
Solution 2 - Php
I had the same problem. After I downloaded the latest version of Microsoft Visual C++, I successfully solved this problem. You can download it here . https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
Solution 3 - Php
if you are using xampp, go to apache folder C:/xampp/apache/bin... rename the vcruntime140.dll to vcruntime140.dll,old hope it works..
Solution 4 - Php
If this issue occurs when trying to integrate Command Line Tools into JetBrains PhpStorm 2019.3.x, check out the current status of this PhpStorm issue, and if it's not fixed in the latest version, use the VC runtime copy workaround described here:
Ensure to install MS VC Redist 2017, which has new vcruntime140.dll
file, then:
>Manually update/replace vcruntime140.dll
at C:\Users\UserName\AppData\Local\JetBrains\PhpStorm 2019.x\jbr\bin
(if installed local), or C:\Program Files\JetBrains\PhpStorm 2019.x\jbr\bin
directory.
Solution 5 - Php
Downloaded and installed vc_redist.x64.exe file from here: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads and It works fine
Solution 6 - Php
Install a compatible version through this link https://support.microsoft.com/pt-br/help/2977003/the-latest-supported-visual-c-downloads
Solution 7 - Php
When using XAMPP Server on Windows whilst using the Laravel Framework to create a website the console logged an error when running the server "vcruntime140.dll 14.0 not compatible with PHP build".
I found the top answer on this page and installed Microsoft Visual C++ Redistributable for Visual Studio 2019 and when I ran the server again it still retuned an error. I noticed from the error log that after the PHP update PHP was being read directly from the C drive.
If you are using XAMPP Server the easiest fix is to copy the PHP folder located at C:\xampp\php and paste it directly to your C:\ drive.
The best method is to update XAMPP.
Solution 8 - Php
I have downloaded and installed vc_redist.x64.exe file from here: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads and It works for me. If you face the same error it will surely work for you
Solution 9 - Php
Since I kept getting this error although vcredist was newly installed, I checked the vcredist files themselves. It turned out that there was an orphan vcredist file in the apache/bin folder which caused the problem.
Solution 10 - Php
if you are using xampp method 1 : download vcruntime14.dll file from (www.dll-files.com) replace the downloaded file in Xammpp\apache\bin
method 2: if you have visual studio 2015 or above installed on you system goto windows\system32 and search for vcruntime14.dll and copy that file and replace it with vcruntime14.dll exists in Xammpp\apache\bin