You just installed your brand-new Windows 2012 RC2 Server and you want to setup the PHP framework aswell. You launch the Windows Web Platform and download the latest PHP version (let's say v5.6.0) and set up php.ini and all the relevant configuration files. Then, as soon as you launch the website, you get the following error:
1 |
C:\Program Files (x86)\PHP\v5.6\php-cgi.exe – The FastCGI process exited unexpectedly |
Despite this being a fair common issue, there aren't many posts explaining how to fix the problem yet. Well, here's one.
Solution
The fix is really simple: you just need to install Visual C++ Redistributable for Visual Studio 2012 Update 4, 32-bit version. Notice that, even if you have a 64-bit operating system, you need to install the 32-bit version because PHP is still a 32-bit application.
Here's the download link: http://www.microsoft.com/en-us/download/details.aspx?id=30679
Once you install that, you'll be good to go.
UPDATE: Since the launch of the x64, experimental version of PHP 5.6 (and above) this post requires the following update: if you're using an 64-bit PHP build, you have to install the 64-bit Visual C++ package, available through the same download link mentioned above. As the two packages can coexist without hassles, our suggestion for 64-bit based installations is to install both as long as x64 PHP builds will be marked as "experimental", so you'll be able to switch back to the x86 version whenever you need to.
Thanks a lot! You really saved me.
Thanks so much for this hint! Worked a treat!
You are a life saver my friend. Thank you so much for this great post.
Very good! This is a solution for my case. Tks
Thanks, save my time!!!!!
Thanks for the solutions, came across ur post after hours of searching. Its sad that theres not much info online about this issue.
So true… :) Thanks to you
I tried the install of PHP 7.0.9 on Win 2012 R2 SP1 with VC++ Redist versions 2010,2012 and 2015 x64 and x86 and I still get a HTTP500 error.
I double check the handler mappings, security on the file and PHP directory. At my wits end.
Here is the code I am trying to run
“accessstat”,
‘UID’=>’accessstat’,
‘PWD’=>’accessstat’);
$conn = sqlsrv_connect( $serverName, $connectionInfo );
if( $conn === false ) {
die( print_r( sqlsrv_errors(), true));
}
$sql = ” Select COUNT (*) FROM [accessstat].[dbo].[Usage_Detail]
$stmt = sqlsrv_query($conn, $sql );
if( $stmt === false)
{
die(print_r(sqlsrv_errors(), true));
}
if(sqlsrv_has_rows($stmt))
{
print(“”);
print(“collectiontime”);
print(“Usercount”);
while($row = sqlsrv_fetch_array($stmt))
{
$regdate = date_format($row[‘collectiontime’], ‘m-d-Y’);
print(“”.$row[‘Usercount’].””);
}
print(“”);
}
?>
Any and all help appreciated
The top part of this got cut off
“accessstat”,
‘UID’=>’accessstat’,
‘PWD’=>’accessstat’);
$conn = sqlsrv_connect( $serverName, $connectionInfo );
if( $conn === false ) {
die( print_r( sqlsrv_errors(), true));
}
$sql = ” Select COUNT (*) FROM [accessstat].[dbo].[Usage_Detail]
$stmt = sqlsrv_query($conn, $sql );
if( $stmt === false)
{
die(print_r(sqlsrv_errors(), true));
}
if(sqlsrv_has_rows($stmt))
{
print(“”);
print(“collectiontime”);
print(“Usercount”);
while($row = sqlsrv_fetch_array($stmt))
{
$regdate = date_format($row[‘collectiontime’], ‘m-d-Y’);
print(“”.$row[‘Usercount’].””);
}
print(“”);
}
?>
Thanks man I’ve looked all over for this.. deleted and installed the stuff like 5 times.. never did it say that in the configs…
Works great
You’re very welcome! Glad we could help you :)