Serverspace Black Friday
DF
June 28, 2022
Updated June 7, 2023

Instruction for installing and configuring PHP and MySQL in conjunction with IIS

Databases Web server Windows

It happens that on a Windows server it is necessary to use it as a web server. The first thing that comes to mind is to install WAMP. Or just install Apache, MySQL and PHP separately. However, particularities also happens, for example, instead of Apache, you want to use IIS. The reasons can be completely different. From the system administrator's lack of desire to learn something new, to the radical views on the part of the information security service. We are going to look throw how to create a bunch of IIS + MySQL + PHP.

In the Serverspace you can create a server with already installed apps "MySQL and Apache".

IIS is a set of Internet services from Microsoft, in other words, a web platform. The peculiarity of IIS is that it supports a large number of modules and applications, including work with MySQL and PHP.

Installing IIS.

Open the Server Manager.

In the window that will open, you should select "Add roles and features".

Add roles and features

In the window Install Roles and Features Wizard, optionally, check the “Skip this page by default” box. This page will appear every time you are going to try adding a role or features. After that press the “Next” button.

Before you Begin

As a next step we should check that the option "Install roles and features" is selected in the Installation type menu . After that, click on the “Next” button.

Install roles and features

At the stage of selecting servers, simply click “Next”, because in our case there is one server

Choosing a server

At the step of selecting server roles, check the box “Web server (IIS)”, click on the “Next” button.

Choosing web server IIS

In the window that is going to appear, click the "Add Components" button. Window will close.

Add components

In the remaining window of the wizard, click on the “Next” button.

At the stage of selecting components, we recommend you to put a tick in the box “Features of the .NET Framework 3.5”. Click "Next".

NET Framework 3.5

At the step “Web Server Role (IIS)” -  click “Next”.

Web Server Role IIS

Optionally, you can check additional services of the Web Server role, such as an FTP server. We press the “Next” button.

Adding Role Services

Confirm the installation by clicking on the “Install” button.

Confirm installation sections

We need to wait for the end of the installation process.

Wait for the end of the installiation

The IIS icon will appear in the Server Manager window. We need click on it.

IIS was installed

In the updated window, right-click on the server name. Select "IIS Manager" from the context menu.

In the manager window that appears, in the left side, select the current server. In the right part of the window - "Get new web platform components".

Get new web platform components

A default browser window will open, prompting you to download and install the Web Platform Installer.

Download the installation package, run and install it

Download the installation package, run and install it.

After installation, click “Get new web platform components” again.

The Web Platform Installer wizard will start.

The Web Platform Installer wizard will start

Installing MySQL and PHP.

There is a search field in the program window. Let's use it. In the search results, select the PHP package. Click on the “Add” button.

Download PHP

Similarly, find the MySQL package, click "Add". When all packages are added, click the “Install” button.

Download MySQL

As on Linux systems, the installer will ask for a password for the MySQL root user. Do not forget the entered password. Click "Continue".

Password for MySQL

The central part of the window lists the programs that will be installed. To view the text of the license agreement for the installed software, click on the hyperlink. If you agree, click the "Accept" button.

Accept prerequistes

We need to wait for the installation to finish.

Waiting for a download to finish

Installation result. Click "Finish".

As you can see, the “PHP Manager for IIS” package has not been installed. Install it in the same way. We find through the search field, click on the “Add” button, then on the “Install” button.

PHP Manager

Remember that the program was not installed due to an incorrect digital signature. It happens. Download the program from github. Don't forget about the bitness of the OS.

The result will be an MSI file. Install it as a normal program. You may need to close IIS Manager during installation

Downloading IIS Manager for PHP

Once the installation is complete, the "PHP Administrator" icon will appear in the IIS Manager window. Open it with a double click.

PHP Manager in your IIS manager

In the window that opens, check phpinfo(). click on the appropriate hyperlink.

Check PHP info

In the opened window for selecting a site and URL, select the default site. Click "OK".

Select default url

The result of executing the phpinfo() function will be displayed in the IIS manager.

PHP info output

Let's check the MySQL installation result.

We need to open a PowerShell window and go to the DBMS location directory using the command:

cd “C:Program FilesMySQLMySQL Server 5.5bin”

Try to connect to the DBMS:

./mysql -u root -p

Enter the password wich you have specified during installation.

MySQL cheking

Vote:
4 out of 5
Аverage rating : 4.3
Rated by: 4
1101 CT Amsterdam The Netherlands, Herikerbergweg 292
+31 20 262-58-98
700 300
ITGLOBAL.COM NL
700 300
We use cookies to make your experience on the Serverspace better. By continuing to browse our website, you agree to our
Use of Cookies and Privacy Policy.