Installing a PHP application server (Windows)

Installing a PHP application server (Windows)

To process dynamic web pages, you need an application server. An application server is software that helps a web server process web pages containing server-side scripts or tags. When such a page is requested by a browser, the web server hands the page off to the application server for processing before sending the page to the browser. For more information, see Understanding Web Applications.

Make sure the PHP application server is installed and running on the system running IIS. (IIS may be located on your hard disk or on a remote Windows computer.) You can download and install it from the PHP website at www.php.net/downloads.php.

With PHP 5, the extension that allows PHP to work with a MySQL database server is not installed or enabled by default by the Windows installer. You must install and enable it manually.

To install PHP 5 on a Windows system:

  1. If applicable, log into your Windows system using the Administrator account.
  2. Download the Windows PHP 5.x installer from the PHP website at www.php.net/downloads.php.
  3. Double-click the installer file you downloaded and follow the onscreen installation instructions.
  4. After PHP is successfully installed, download the Windows PHP 5.x zip package from the PHP website at www.php.net/downloads.php, and then extract the package in a temporary folder on your hard disk.

    The zip package contains the extension you need to work with MySQL.

  5. In the temporary folder containing the unzipped files, locate the folder called ext and copy it to the C:\PHP\ folder.

    The ext folder contains common PHP extensions, including the MySQL extension.

  6. In the C:\Windows folder, locate the file called php.ini and open it in Notepad.

    You must edit this file to enable the MySQL extension.

  7. Find the following line in the php.ini file:

    extension_dir = "./"

    This line specifies where PHP looks for extensions.

  8. Edit the line as follows:

    extension_dir = "C:\PHP\ext\"

    Tip: Don’t omit the final slash.

  9. Find the following line in the php.ini file:

    ;extension=php_mysql.dll

    The semicolon (;) at the start of the line tells PHP to ignore the line.

  10. Delete the semicolon at the start of the line to enable the extension.

    extension=php_mysql.dll

  11. Save and close the php.ini file.
  12. In the temporary folder containing your unzipped PHP files, locate the file called libmysql.dll and copy it to the C:\Windows\system32 folder.

    This file is required so that IIS can work with PHP 5 and MySQL.

  13. Restart IIS.

For more information on enabling the MySQL extension, see the PHP website at www.php.net/manual/en/ref.mysql.php. For more information on the application server, see the PHP documentation, which you can download from the PHP website at www.php.net/download-docs.php.

After installing PHP, you can test the server to make sure it works properly. (See Testing the PHP installation (Windows).)



Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly