Windows 2012 R2 C:\Program Files (x86)\PHP\v5.6\php-cgi.exe – The FastCGI process exited unexpectedly PHP

The FastCGI process exited unexpectedly – Trying to run PHP on IIS 8.0

This problem has been talked about extensively around the forums, but no one is being clear on how to fix the problem. The issue first appeared after installing new Windows 2012 R2 Release.  after using  the Windows Web platform installer 5.0 to install  the framework PHP 5.6.0 and I might add when we tested on PHP 5.5 .11, a simple test page return the error: C:\Program Files (x86)\PHP\v5.6\php-cgi.exe – The FastCGI process exited unexpectedly

The Solution

You need to install the: Visual C++ Redistributable for Visual Studio 2012 Update 4  32-bit version.  and it should be noted that even if your operating system is a 64-bit operating system, you must install the 32-bit version  as PHP does not run in 64 bit.

 A download link is here: http://www.microsoft.com/en-us/download/details.aspx?id=30679

Select the download button

FastCGI Process exited unexpectedly

 

Select the 32 bit version or x86

Screenshot 2015 03 23 00 36 43

Screenshot 2015 03 23 00 37 01

 

You are done!

Screenshot 2015 03 23 00 37 10

Test your PHP and you should be good to go.

Creating a New OpenCart Deployment on a Windows Server IIS

We are going to cover the deployment of an OpenCart (open source shopping cart) on a Windows 2003 Server, 2008 Server.

We are assuming that the server is setup to run IIS websites, and that you have some general idea about running websites in general on IIS. If this is not the case and you are learning from scratch. Better to learn on Linux server.

Assuming you want to get OpenCart running on IIS.

 

Step 1 – Web Platform Installer

Install the Microsoft Web Platform Installer on the server from this link.

http://www.microsoft.com/web/downloads/platform.aspx

In Windows 2003 you need to:

Go to the directory on your server: C:\php

Find the file: php.ini

Edit the file in a text browser, finding the following lines:

extension=php_curl.dll

extension=php_gd2.dll

extension=php_mysql.dll

And remove the ; before each line:

image

Then save the file.

Start a Command Prompt “cmd” and type “iisreset”

image

This enabled MySQL, GD, and cURL,

 

Step 2 – Setup PHP on the server.

Start the Web Platform Installer and search PHP in the top right of the search window.

Select and install the latest version of PHP from the list.

image

 

Step 3 – Install MySQL on the server.

Also from the Web Platform Installer, search “MySQL” and install that.

image

During the install, you will be asked for a password for the –root- user. This is the Administrator account and the password should be very well guarded and complex.

 

Step 4 – Create a Database in MySQL.

Open the My SQL Command Line Tool and enter the –root- password selected above.

image

Modify the following script to replace the database name, user name and password.

create database mydb;
 
CREATE USER ‘myuser’@’localhost’ IDENTIFIED BY ‘mypassword‘;
CREATE USER ‘myuser‘@’%’ IDENTIFIED BY ‘mypassword’;
 
GRANT ALL PRIVILEGES ON mydb.* TO ‘myuser‘@’localhost’;
GRANT ALL PRIVILEGES ON mydb.* TO ‘myuser‘@’%’;
 
FLUSH PRIVILEGES;

Enter your own values where highlighted above.

Copy and paste that line by line into the MySQL Command Line Window. You only need to run one from the first two, then one from the second two.

If you need to change a password.

SET PASSWORD FOR 'myuser'@'localhost' = PASSWORD('newpass');

SET PASSWORD FOR 'myuser'@'%' = PASSWORD('newpass');

FLUSH PRIVILEGES;

 

Step 5 – Download and unzip to Web Located Folder the contents of OpenCart

Download here: http://www.opencart.com/index.php?route=download/download

The contents of the download package is in a folder called “upload”

image

Extracted in our case to a folder we called: opencart.interactivewebs.com

image

 

Step 6 – Create an IIS instance to hit that directory.

Using the IIS skills that we suggested you should have. Create a new site that hits the directory you dropped the Upload contents to above.

image

For Windows make sure the following folders and files permissions allow Read and Write.
image/
image/cache/
cache/
download/
config.php
admin/config.php

 

Step 7 – Set the permissions for IIS.

From the Exploring, Right click the folder with the web files in it, and select Security Tab. Modify the permissions for:

IUSR – Modify (you will probably need to add this)

image

IIS_IUSRS(<servername>\IIS_IUSRS) – modify

image

 

Step 8 – Visit the home page.

Visit the store homepage
e.g. http://www.example.com or http://www.example.com/store/

Accept the license

image

Check the permissions you need.

image

Fill in the following details with the relevant information.

image

Using the MYSQL database settings you created above.

image

As per the instruction above, you need to delete the Instillation directory.

image

 

Step 9 – Deleted this directory.

Restart IIS from the command prompt again. “iisreset”

Common problem if permissions are not set correctly.

http://www.opencart.com/index.php?route=documentation/documentation&path=7_57