Hello Everyone,
I'm here today to bring you a tutorial on installing PHP5 on Windows as a FastCGI Server. Recently Aprelium has release v2.4.0.3 of Abyss Web Server. This new version of Abyss, allows you to run FastCGI externally using the "FastCGI (Remote - TCP/IP sockets)" option.
First thing you need is PHP5 (Zip Archived package). You can download the latest version from
www.php.net (PHP 5.2.2 is the newest and recommended).
Step 01.
Unzip the contents from the Zip Archive file that you downloaded from php.net to a new folder C:\PHP5 (You need to create the PHP5 folder yourself.)
Step 02.
Open a command line (Start -> Run -> cmd.exe) and change to your PHP5 folder "cd C:\PHP5"
Step 03.
Type this command "php-cgi.exe -b 127.0.0.1:2700" in the command line. This will start the server (By the way, it's multi-threaded!)
Step 04.
Now that we have our server runnning, let's configure Abyss Web Server to connect to it. Open your abyss console and click Configure for the Host you wish to configure. Go to "Scripting Parameters" and click "Add" in the Interpreters table (Click the Edit icon if your following the "PHP FastCGI Backup System" tutorial). Copy the following settings
Interface: FastCGI (Remote - TCP/IP sockets)
Remote Server IP Address: 127.0.0.1
Port: 2700
Type: PHP Style
Now click "Add" in the "Associated Extensions" table and type "php" without the quotes.
Note: You shouldn't need to do this if you're following the tutorial for "PHP FastCGI Backup System". Link:
http://www.aprelium.com/forum/viewtopic.php?t=12766
Save your settings!
Click "Add" in the "Environment Variables" table and add the following settings.
Name: REDIRECT_STATUS
Value: 200
Note: You only need to do this part if you don't have it already listed.
Apply your settings and restart Abyss Web Server.
It's time to test it!
Create a new file in your htdocs folder and call it "phpinfo.php". Add the following code to that file.
<?php phpinfo(); ?>
Save the code run it from your browser "
http://localhost/phpinfo.php".
Now, instead of multiple FastCGI processes, you can run your PHP scripts from a multi-threaded FastCGI server! Enjoy!
Note: The address for the FastCGI server can also be remotely accessed by other servers unless you keep it at "127.0.0.1".
Note: You can also create a batch file so that the FastCGI server can be runned at startup.
Example batch code: fastcgi_server.bat
@echo off
echo The FastCGI Server is started!
C:\PHP5\php-cgi.exe -b 127.0.0.1:2700
I hope everyone liked the tutorial.