Manish Kumawat
Last Updated on: 16 July 2024
In this step of building a PHP website, you install IIS and FastCGI, download and install PHP and the WinCache extension, and upload your PHP application.
When you are done, make sure that IIS and the PHP are installed, and your PHP application has been added to your website. Then go on to Step 2: Configure PHP Settings.
To install IIS, use the following steps:
On the Start page, click the Server Manager tile, and then click OK.
In Server Manager, select Dashboard, and click Add roles and features.
In the Add Roles and Features Wizard, on the Before You Begin page, click Next.
On the Select Installation Type page, select Role-based or Feature-based Installation and click Next
On the Select Destination Server page, select Select a server from the server pool, select your server, and click Next.
On the Select Server Roles page, select Web Server (IIS), and then click Next.
On the Select Features page, note the preselected features that are installed by default, and then select CGI. This selection also installs FastCGI, which is recommended for PHP applications.
Click Next.
On the Web Server Role (IIS) page, click Next.
On the Select Role Services page, note the preselected role services that are installed by default, and then click Next.
Note
You only have to install the IIS 8 default role services for a static-content web server.
On the Confirm Installation Selections page, confirm your selections, and then click Install.
On the Installation Progress page, confirm that your installation of the Web Server (IIS) role and required role services completed successfully, and then click Close.
To verify that IIS installed successfully, type the following into a web browser:
http://localhost
You should see the default IIS Welcome page.
On the Start page, type Control Panel, and then click the Control Panel icon in the search results.
In Control Panel, click Programs, and then click Turn Windows features on or off.
In the Windows Features dialog box, click Internet Information Services, note the preselected features that are installed by default, and then select CGI. This selection also installs FastCGI, which is recommended for PHP applications.
Click OK.
To verify that IIS installed successfully, type the following into a web browser:
http://localhost
You see the default IIS Welcome page.
The procedures in this section guide you to install PHP Manually:
To keep this procedure simple, install the WinCache extension but do not configure it. You will configure and test WinCache in Step 2: Configure PHP Settings.
C:\PHP\
.C:\PHP\ext
. The WinCache .zip package contains one file (Php_wincache.dll).;C:\PHP
. Click OK.C:\PHP\Php-cgi.exe
.Open a text editor, for example Notepad, as Administrator.
In a new file, type the following text: <?php phpinfo(); ?>
Save the file as C:\inetpub\wwwroot\Phpinfo.php
.
Open a browser and enter the following URL:
http://localhost/phpinfo.php
A nicely formatted webpage is displayed showing the current PHP settings.
Once you have IIS and PHP installed, you can add a PHP application to your web server. This section describes how to set up your PHP application on an IIS web server with PHP installed. It does not explain how to develop a PHP application.
Open IIS Manager.
In the Connections pane, right-click the Sites node in the tree, and then click Add Website.
In the Add Website dialog box, type a friendly name for your website in the Site name box.
If you want to select a different application pool than the one listed in the Application Pool box, click Select. In the Select Application Pool dialog box, select an application pool from the Application Pool list and then click OK.
In the Physical path box, type the physical path of the website's folder, or click the browse button (...) to navigate the file system to find the folder.
If the physical path that you entered in step 5 is to a remote share, click Connect as to specify credentials that have permission to access the path. If you do not use specific credentials, select the Application user (pass-through authentication) option in the Connect As dialog box.
Select the protocol for the website from the Type list.
The default value in the IP address box is All Unassigned. If you must specify a static IP address for the website, type the IP address in the IP address box.
Type a port number in the Port text box.
Optionally, type a host header name for the website in the Host Header box.
If you do not have to make any changes to the site, and you want the website to be immediately available, select the Start Web site immediately check box.
Click OK.
I am Manish Kumawat, co-founder of Fulminous Software, a top leading customized software design and development company with a global presence in the USA, Australia, UK, and Europe. Over the last 10+ years, I am designing and developing web applications, e-commerce online stores, and software solutions custom tailored according to business industries needs. Being an experienced entrepreneur and research professional my main vision is to enlighten business owners, and worldwide audiences to provide in-depth IT sector knowledge with latest IT trends to grow businesses online.
Discuss your Custom Application Requirements on info@fulminoussoftware.com or call us on + 1 803 310 5187.
15 Days Risk-Free Trial