PHP on Windows: workaround for a command-line error (MSVCR71.DLL is missing)
I’m currently writing a tutorial on how to install, test and use the PHP symfony framework on Windows Web Server 2008.
In order to install it, I start from a raw Windows Server installation, with IIS role not enabled.
I download Microsoft Web Platform Installer (WebPI) 2.0 RTM from this link, and only select PHP 5.2.11.
WebPI selects all dependencies, and install goes fine.
Execution of phpinfo.php I created in C:\inetup\wwwroot is fine.
But…
When I open a command prompt, CD to \inetpub\wwwroot, type “PHP phpinfo.php”, and get the blocking error:
This application has failed to start because MSVCR71.dll was not found. Re-installing the application may fix the problem.
If we don’t do anything, the execution of PHP.EXE hangs on the absence of MSVCR71.DLL. It’s annoying, as all symfony commands rely on PHP.EXE command line. So we must find that DLL file, and install it at the correct place.
This MSVCR71.DLL is an old version of the Microsoft Visual C++ runtime, dated back to the 2003 era. It is contained in the .Net Framework 1.1 redistributable package.
To download the .Net Framework 1.1 redistributable package, just go to:
<https://msdn.microsoft.com/fr-fr/netframework/aa569263.aspx>
After install, the file we’re looking for is installed in the following directory :
C:\Windows\Microsoft.NET\Framework\v1.1.4322
Just copy the MSVCR71.DLL to the following destination:
-on x64 systems: in C:\windows\syswow64 directory;
-on x86 systems: in C:\windows\system32 directory,
You now can uninstall the .Net Framework 1.1.
Then, we can run PHP.EXE from the command prompt without error.
Useful?
Technorati Tags: WebPI,Microsoft Web Platform,PHP,PHP on Windows,MSVCR71,MSVCR71.DLL
Comments
Anonymous
April 26, 2010
The comment has been removedAnonymous
December 06, 2012
Very useful since Im trying to install Apache with PHP, which I did successfully back in 05; however "PROGRESS" have been ongoing and everything shall be more complex; so when running PHP.exe the MSVCR71.dll is COMPLINED on (I just now dont know is that is also the problem why Apache wont work when PHP is addedd). NOW your reference to pic up framework for 1.1 is no longer valid back in 05 there were no external .dll dependency for PHP, regrettable when people are building spagettiAnonymous
May 15, 2013
Many thanks. Already spent hours troubleshooting this. I skipped Windows Update after a server rebuild so was missing Framework 1.1 and had the mssql error. Thanks again.Anonymous
June 02, 2014
hyeganegi.millionsoc.cpa.clicksure.comAnonymous
February 27, 2015
Very useful. I lost much time to find that.