TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sat May 05, 2007 5:11 pm Post subject: PHP FastCGI Backup System (Abyss Hack) |
|
|
Hello Everyone,
I'm here to bring you a whole new Abyss Web Server hack. Lately I've been testing the new windows FastCGI Server support in 5.2.2 and came apon something very interesting. It's possible to run two different FastCGI Modes in Abyss Web Server at the same time. This is a great way to make sure your PHP stays intact all the time. For example, let's say you're using PHP as a FastCGI Server and all of the sudden it crashes without warning, what do you do? With this new hack I created, you can let Mr. Local Pipes FastCGI take over!
Let's get started.
This is a multi-step process and it may take a while to do but it should only
take a few minutes to make it work.
Step 01.
Download PHP5 (v5.2.2 [Zip file]) or newer from: http://www.php.net and unzip the contents from that Zip file to a new folder in C:\ called PHP5.
Note: You should delete your old PHP configurations in the Abyss Web Server console.
Step 02.
Open your Abyss Web Server console and click on the Host you wish to configure. Go to "Scripting Parameters" and click "Add" in the "Interpreters" table for your FastCGI (Local - Pipes) setup.
Change your settings to the following.
Interface: FastCGI (Local - Pipes)
Interpreter: C:\PHP5\php-cgi.exe
Type: PHP Style
Now click "Add" in the "Associated Extensions" table and enter "php" without the quotes. Click OK. Click Add in the "Environment Variables" table and type the following settings.
Name: REDIRECT_STATUS
Value: 200
Apply your settings and restart Abyss Web Server.
Step 03.
Now it's time for the magic part. At this point, you will need to follow a different tutorial in a new Window "Running PHP in FastCGI Server Mode!", but instead of adding a new Interpreter like the tutorial say's, edit your last PHP Configuration you just did (Follow Steps 2-4 only!). Link: http://www.aprelium.com/forum/viewtopic.php?p=65875#65875
Once you've done all these steps, it's time for your reward. Start the FastCGI Server and browse a few PHP Files while it's running, you get your PHP pages just fine. Now stop the FastCGI Server! Oh no, it can't serve PHP files anymore! But wait! Magicly, you still get your PHP files served. How is that possible?
It's rather simple.
Abyss Web Server has an inteligent Interpreter system. If one fails, the other will take place. So if your FastCGI Server crashes, the other one will work. I didn't know this until I found out about it by accident.
I hope you liked this tutorial. |
|