Installing PHP 5 on IIS in 5 simple steps. Yes, yet another PHP 5 installation guide. Why write one when there are already dozens of them out there?
Well there are two main reasons: firstly I will be writing a lot of guides that require PHP to be installed and working and I will need something to point people to who have yet to install PHP. Secondly, I have read a lot of the guides out there and found that a good portion of them over complicate the process. It really should not be that hard or perplexing. In this guide we'll break down the process of installing PHP 5 on IIS into 5 simple steps that are easy to follow that works for IIS 5, IIS 5.
This article describes how to install IIS 7.0 and SMTP on Windows Server 2008, step by step with pictures. This is fourth set of instructions that I am looking at to get PHP to work. For some reason mmc.exe would stall each time I would attempt to use Window's IIS GUI to.
IIS 6. NOTE: This guide is intended for use with PHP 5. A guide for PHP 5. So what are these 5 simple steps? In a nutshell, this is all you need to do to install PHP 5 on IIS; Download and Extract PHP 5 (we'll install PHP 5. IIS 5. 1 in this guide)Set your environment variables.
Set the PHP application mapping in IISConfigure php. Restart & Verify.
INSTALLING MYSQL: Step 1: Install MySQL 5.0. Step 2: Install MySQL 5.0 GUI Tools. These will allow you to view your databases and data structures.
Just before we continue I thought it pertinent to mention that it if you have already installed, or attempted to install PHP on your system then you must remove all traces of that install before continuing. If ANY PHP files exist anywhere else on your system that are accessible via the PATH environment variable, then it is very possible (even probable if the previous version of PHP was different) that you will have issues with hosting PHP content. If you are wanting to install PHP 4, then the process is slightly more complex than installing PHP 5 and involves steps not covered in this guide. Not to worry as it is even easier for you. All you have to do is download the IIS Aid PHP Installer from this site and run the fully automated GUI installer. This installer will completely setup your PHP 4 environment, including all environment variables, IIS scriptmaps and IIS 6 web extension. The particular advantage of this installer is that it configures PHP 4 to use Fast.
CGI mode as well as an Opcode cache for maximum performance. Expect to see some articles of just how much faster here in the future. Download and Extract PHP 5.
Nothing taxing about this, simply go to the PHP download page and download the latest PHP zip package from under the "Windows Binaries" section, along with the latest PECL Win. CGI/Fast. CGI as otherwise you run the risk of a race condition). Save the PHP zip package to the directory where you will want to install PHP (e. D: \PHP), and then extract.
This tutorial will guide you through setting up PHP on your IIS 7.5 server. Time to complete: ~15 minutes. Requirements: Working installation of IIS 7.5. Configuring PHP with MySQL for Apache 2 or IIS in Windows from Get it Done with MySQL 5&6 by Peter Brawley and Arthur Fuller. To be blunt, getting PHP and MySQL to.
Once extracted you'll see inside your PHP installation directory a sub directory called "ext". Save the PECL Win. D: \PHP\ext), and then extract.
Your PHP install directory should now contain all the content of your PHP zip package file, and your ext sub directory should contain the contents of your PECL Win. From here move back to the root of you PHP installation directory (e.
D: \PHP) and create three directories, one called sessions, one called upload and one called log. In the log directory create a new file called php. First step licked.
PHP: Microsoft IIS 5. IIS 6. 0. This section contains instructions for manually setting up Internet Information. Services (IIS) 5. IIS 6. 0 to work with PHP on Microsoft Windows XP and Windows.
Server 2. 00. 3. For instructions on setting up IIS 7. Windows. Vista, Windows Server 2.
Windows 7 and Windows Server 2. R2 refer to. Microsoft IIS 7. Configuring IIS to process PHP requests. Download and install PHP in accordance to the instructions described in. Note. Non- thread- safe build of PHP is recommended when using IIS.
The non- thread- safe. PHP for Windows. Binaries and Sources Releases.
Configure the CGI- and Fast. CGI- specific settings in php. Example #1 CGI and Fast. CGI settings in php. Download and install the » Microsoft Fast. CGI Extension for IIS 5. The extension is available for 3.
Configure the Fast. CGI extension to handle PHP- specific requests by running the command shown below. Replace the value of the "- path" parameter with the absolute file path to the. Example #2 Configuring Fast. CGI extension to handle PHP requests. PHP" ^. - extension: php - path: "C: \PHP\php- cgi.
This command will create an IIS script mapping for *. URLs. that end with . Fast. CGI extension. Also, it will configure Fast. CGI extension to. PHP requests. At this point the required installation and configuration steps are completed. The remaining. instructions below are optional but highly recommended for achieving optimal functionality.
PHP on IIS. Impersonation and file system access. It is recommended to enable Fast. CGI impersonation in PHP when using IIS. This. is controlled by the fastcgi.
When. impersonation is enabled, PHP will perform all the file system operations on. IIS authentication. This. ensures that even if the same PHP process is shared across different IIS web.
PHP scripts in those web sites will not be able to access each. IIS authentication. For example IIS 5. IIS 6. 0, in its default configuration, has anonymous authentication enabled. IUSR_< MACHINE_NAME> used as a default identity. This means that in.
IIS to execute PHP scripts, it is necessary to grant IUSR_< MACHINE_NAME> account. If PHP applications need to perform write operations on certain. IUSR_< MACHINE_NAME> account should have write permission to those. To determine which user account is used by IIS anonymous authentication, follow these steps. In the Windows Start Menu choose "Run: ", type "inetmgr" and click "Ok"; Expand the list of web sites under the "Web Sites" node in the tree view, right- click on a web. Properties". Click the "Directory Security" tab; Take note of a "User name: " field in the "Authentication Methods" dialog. To modify the permissions settings on files and folders, use the Windows Explorer user interface.
Example #3 Configuring file access permissions. C: \inetpub\wwwroot\upload /grant IUSR: (OI)(CI)(M). Set index. php as a default document in IIS. The IIS default documents are used for HTTP requests that do not specify a document name. With PHP applications. To add index. php to the list of.
IIS default documents, follow these steps. In the Windows Start Menu choose "Run: ", type "inetmgr" and click "Ok"; Right- click on the "Web Sites" node in the tree view and select "Properties"; Click the "Documents" tab; Click the "Add.." button and enter "index. Default content page: ".
Fast. CGI and PHP Recycling configuration. Configure IIS Fast. CGI extension settings for recycling of PHP processes by using the commands shown below.
The Fast. CGI setting instance. Max. Requests controls how many requests will be processed by a single. Fast. CGI extension shuts it down. The PHP environment variable. PHP_FCGI_MAX_REQUESTS controls how many requests a single php- cgi. Make sure that the value specified for Fast.
CGI Instance. Max. Requests. setting is less than or equal to the value specified for PHP_FCGI_MAX_REQUESTS.
Example #4 Configuring Fast. CGI and PHP recycling. PHP" ^. - Instance. Max. Requests: 1. PHP" ^. - Environment. Vars: PHP_FCGI_MAX_REQUESTS: 1.
Configuring Fast. CGI timeout settings. Increase the timeout settings for Fast. CGI extension if there are applications that have long running PHP scripts. The two settings that control timeouts are Activity. Timeout and Request.
Timeout. Refer to » Configuring Fast. CGI Extension for IIS 6. Example #5 Configuring Fast.
CGI timeout settings. PHP" ^. - Activity. Timeout: 9. 0. cscript %windir%\system. PHP" ^. - Request. Timeout: 9. 0. Changing the Location of php. PHP searches for php. PHPRC environment variable.
To instruct PHP. to load the configuration file from a custom location run the command shown below. The absolute path to the directory with php. PHPRC environment variable.
Example #6 Changing the location of php. PHP" ^. - Environment. Vars: PHPRC: "C: \Some\Directory\".