The following article uses options that are available starting with the Professional edition and project type.
This tutorial will present the required steps to deploy a PHP website using Advanced Installer:
The first step to create the installation package is to add the website resources in the Files and Folders page.
Because the content of this folder might change during the development process certain files must be included or excluded in the Advanced Installer project, making it difficult to track these changes. You can automate this step by using the folder synchronization feature from Advanced Installer. Aditional information about how synchronized folders work is available in the Working with Synchronized Folders article.
Thus, in the Application Folder view from the
Files and Folders page, you can create a regular folder. You can synchronize this folder with
the content of the directory where website resources are located. Repeat
this step to add the PHP resources files to the installation
After this step, your project's Files and Folders
view should look as follows:
It's good practice to make sure that your websites will run under their application pool; using the Default App Pool might prevent websites from running as expected. To create an application pool for the website you can use the toolbar button from the IIS view.
Since the content of the website has been added to the project,
it is time to create the website. In the IIS
view, you can create a new website using the toolbar button. When prompted, please select the
previously created folder from the Application Folder view
as the website's physical folder. The website should look like this:
In the Application Mappings tab of the website, you need to use php-cgi.exe ( from the PHP Resources folder ) and select the FastCGI module for handling .php requests. Additional settings for the FastCGI application can be configured for the Global Settings IIS tree node using the Application properties dialog from the FastCGI Settings tab.
Next, we need to enable the Use installed application pool option from the Application Pool tab and select the previously created pool.
Another necessary step to get everything working is to add the index.php document in the Default Document tab of the website. Just create a new document using the button and name it index.php.
Starting with Windows Vista, IIS comes out of the box as a set of optional Windows Features.
All we have to do is enable the IIS features using a Windows Feature Bundle. To do this, we simply use the from the Prerequisites view of Advanced Installer. We can select the Target Operating Systems for the windows feature, according to our scenario.
For our particular scenario, we will select only the
Default Document feature. Please use the right top filter
to search for the Default Document Windows Feature:
When a new website is created in the Advanced Installer project, an IIS launch condition is automatically enabled in the Software tab from the Launch Condition page. Since we made sure that IIS is enabled on the target machine, via Windows Features, it is safe to remove the software launch condition.
If your scenario requires launching the website in a browser at
the end of the installation process, you can use the predefined Open URL
custom action as a custom action with a sequence.