| Install PHP | |||
| by CyanBlue | |||
I needed to format the hard drive and install things here and there. As usual, I needed to install PHP and other stuff that I need to have. Here are some screenshots that I have captured over the process. |
|||
| 1. | Download PHP Installer from the http://www.php.net/downloads.php page. | ||
| They currently have PHP 5.0.2 and PHP 4.3.9 available on the page. I chose PHP 4.3.9 because that's what my host has and that's similar to my deployment environment. | |||
The PHP.net provides the installation package in two format for the Windows. One is the executable installer and another one is the zip package. I suggest you download the EXE version because that's easier to install and configure the web server. |
|||
| 2. | Execute the downloaded file(php-4.3.9-installer.exe). | ||
| 3. | Follow the steps to install the PHP 4.3.9. | ||
| 3.01 | Welcome | ||
![]() |
|||
| 3.02 | License Agreement | ||
![]() |
|||
| 3.03 | Installation Type | ||
| Select Standard from the list and click Next. | |||
![]() |
|||
| 3.04 | Choose Destination Location | ||
| Select appropriate directory where you want do install the PHP. I created C:\L\PHP for this. | |||
![]() |
|||
| 3.05 | Backup Replaced Files - Advanced Only | ||
| Select the directory where you want to backup the files. | |||
![]() |
|||
| 3.06 | Choose Upload Temporary Directory - Advanced Only | ||
| Select a directory where PHP can use as a temporary directory when uploading a file via PHP script. | |||
![]() |
|||
| 3.07 | Choose Session Save Directory - Advanced Only | ||
| Select a directory where PHP can store session data. | |||
![]() |
|||
| 3.08 | Mail Configuration | ||
| Enter the correct name of the SMTP server and your email address. This information is used when you use mail() function in your PHP script. I wrote smtp.east.cox.net for the SMTP server. I am sure you should be able to find this information from your Internet provider. |
|||
![]() |
|||
| 3.09 | Error Reporting Level - Advanced Only | ||
| Select the default value when you are setting up the development machine. If you are setting it up for the actual host, you might want to reduce the level of this to the minimum for better user experience. | |||
![]() |
|||
| 3.10 | Server Type - Advanced Only | ||
| Select the web server you have installed on your machine. Most of the times, PHP installer detects the correct web server, but if you think the selected web server is not installed on your machine, make sure you correct this before you go on any further. | |||
![]() |
|||
| 3.11 | File Extensions - Advanced Only | ||
| Select the file extensions you want to associate with the PHP. i selected .php and .php3 because I have some old PHP files with .php3 extension that I might need to run from time to time. | |||
![]() |
|||
| 3.12 | Start Installation | ||
![]() |
|||
| 3.13 | Installing | ||
![]() |
|||
| 3.14 | Existing php.ini file found | ||
| This screen will pop up if you already have PHP installed. Select Yes unless you had problem with your PHP beforehand. | |||
![]() |
|||
| 3.15 | Warning | ||
This screen will pop up only if you said Yes from the 3.14. Open up the C:\Windows\php.ini file in your text editor and see if 'cgi.force_redirect = 0' exists and add it if you don't see it. |
|||
![]() |
|||
| 4. | Test. | ||
| 4.01 | Open up your favorite text editor and type this script. | ||
| and save it as phpinfo.php in the C:\Inetpub\wwwroot directory (IIS) | |||
| 4.02 | Open up the web browser and type this address. | ||
| http://localhost/phpinfo.php | |||
![]() |
|||
| 5. | Register index.php to IIS. | ||
| 5.01 | Start - Control Panel - Administrative Tools - Internet Information Services | ||
![]() |
|||
| 5.02 | Right click on the 'Default Web Site' and select Properties. | ||
![]() |
|||
| 5.02 | Select Documents tab. | ||
![]() |
|||
| 5.03 | Select Add button, type 'index.php' and hit Apply button and you are all set. | ||
![]() |
|||
| Hope it was useful to you. :) |
| Once you are done installing the PHP, don't forget to download the PHP manual from this page http://www.php.net/docs.php and keep it where you can find easily since it's got really great information you need to know when programming in PHP. |