Skip to main content

php-cgi.exe – The FastCGI process exited unexpectedly error and how to fix it

The Problem

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:

Despite this being a fair common issue, there aren’t many posts explaining how to fix the problem yet. Well, here’s one.

The 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.

MySQL Master-Master Replication setup in 5 easy steps

Introduction

Master-Master replication, also known as mirror, is by far the simplest technique you can use to increase the performance and the reliability of your MySQL server installation. If you don’t know what it is, just imagine two MySQL server instances continuosly updating each other in real-time while fullfilling their job. In order to do that you’ll need a second machine/server, meaning you’ll have to sustain more costs: don’t make this stop you – an investment like that is hardly worthless: conversely, it will most likely be a substantial improvement for your system. That’s what you’ll basically gain:

  • A 1:1 mirror your entire database pool (or a selection of your choice), ensuring you won’t lose anything due to an hardware (or software/OS) crash.
  • A more robust, fail-proof and scalable environment, as long as you’ll connect different web sites/services/apps to each of your DB and install a software or hardware http load balancer to distribute clients between them.

One of the most common scenarios involving Master-Master replication is when you have a 2 VPS (or hosting servers) environment/farm, each one providing an http web server (such as IIS or Apache) containing one or more web sites connected to a local MySQL server instance on the same machine. Once you put up a Master-Master replication mechanism between the two MySQL instances you’ll basically have setup a real-time web mirror, which you can use as a disaster recovery (see picture below), and/or a 2-nodes web cluster managed by an hardware load-balancer responding to a third IP – or any other balancing technique you might want to adopt.

mysql-master-master-replication-diagram

Read More

Close