48

Trying to setup nginx and php on my Windows machine, but every time I try to start php-cgi.exe I get a system error.

The program can't start because MSVCR110.dll is missing from your computer. Try reinstalling the problem to fix this problem.

I'm using Wnmp to start my programs and downloaded the latest PHP 5.5 to it (32bit version).

I have Visual C++ 2008 x86, C++ 2010 x64 and C++ 2010 x86.

What am I missing and why can't PHP list programs required for PHP (cgi) to work?

Marwelln
  • 599
  • 1
  • 5
  • 5
  • 17
    How the heck could this be off topic? I'd really like to know. This is a bonafide server issue for me. – hopeseekr Jun 26 '14 at 17:05
  • 4
    yea that's stupid. this is a real issue and the fix below worked for me – Andy Brudtkuhl Sep 24 '14 at 16:43
  • Perhaps this will be better suited to StackOverflow as it is about programming tools. – James Dec 04 '14 at 12:01
  • 6
    I hate it when the moderators mark stuff as off-topic. I got here via google by typing in an exact phrase. It is not off-topic for me, and it is the only place I found my answer after much searching. – LonnieBest Jan 19 '15 at 23:54

1 Answers1

75

You need VS C++ 2012. Go here: http://www.microsoft.com/en-us/download/details.aspx?id=30679

You need to download the x86 version if you install the 64bit version it will give the same error.

Eduard Florinescu
  • 831
  • 5
  • 24
  • 39
Nathan C
  • 14,901
  • 4
  • 42
  • 62
  • 1
    Even if the php version is 5.5.3 and for 64-bit systems ?! – Muhammad Gelbana Sep 02 '13 at 09:12
  • 4
    @MuhammadGelbana Yes, it relies on some 32-bit functions. – Nathan C Sep 03 '13 at 00:51
  • 4
    I needed both, well I installed the 32bit version first and it failed as per ops error message and then I installed the 64 bit version and all was well. This is on Windows Server 2012 data center using PHP 5.5 (5.5.4) – rism Oct 09 '13 at 05:05
  • 2
    All the other pages were suggesting I needed 2010, but finally I came across your answer. Very Thankful! Like rism, I had to install both 32bit and 64bit before it worked. – LonnieBest Jan 19 '15 at 23:49
  • Thanks surprised this wasn't included with the WebPlatform PHP installer module. – dynamiclynk May 15 '15 at 15:41
  • 2
    FYI the name of the missing file is important. If you are looking for `MSVCR110.dll` then this is the answer. If you are looking for `MSVCR100.dll` (not the version number is 100 instead of 110) then you need to download the `VS C++ 2010` package. – DavidG Jun 29 '15 at 15:13