PHP 4 Windows
Learn And Run PHP On Your Windows Computer

This PHP 4 Windows Download Tutorial gets you started by downloading PHP to your Windows computer, even an old one (see FAQs for more details). You then run two PHP programs. By the way, after completing Step 3 you can copy the contents of the EasyPHP directory to another Windows computer and run these and future PHP programs if you have an Internet browser, even if you don't have a live Internet connection.

Downloading PHP And Other LAMP Components

This tutorial will download PHP, Apache, and MySQL to your Windows computer. It does not download Linux. You then run two simple PHP programs.


Step 1 In Google or another search engine type easy php download and select a site. I chose the first on my list, www.softpedia.com/get/Authoring-tools/Setup-creators/EasyPHP.shtml.

Step 2 The site announces EasyPHP 2.0 Beta 1, which is not yet a stable version of PHP. Let's not take a chance and instead go for the older, stable version 1.8 Later, when you are preparing PHP or MySQL certification you will have to work with other versions. I don't think they will certify someone who refuses to do several downloads. Click the Download EasyPHP link presently in the lower right-hand corner of the screen.

Step 3 Click the External Mirror 2 Stable link. Click to save the easyphp1-8_setup.exe file. Select the language version. (In these tutorials I use the English version, but have also worked with the French version.) Follow the on-screen directives making sure to accept the agreement. I chose to install the system (Apache, MySQL, and PHP) into the C:\Program Files\EasyPHP directory. Once the installation was completed this folder was less than 60 Megabytes. I created a program shortcut named EasyPHP. Then I accessed the EasyPHP button in Window's Task Pad to obtain the results shown in Figure 1.

PHP download tutorial figure 1

PHP Download Tutorial Figure 1
Easy PHP command post. Note that Apache and MySQL are also started.



Step 4 Now we have to prove that our PHP installation actually works. It is traditional in many areas of computer programming to create a Hello World program whose output shows that you are ready to begin. Using WordPad or a similar text editor create a file called hello.php whose contents are shown in Figure 2.

PHP download tutorial figure 2

PHP Download Tutorial Figure 2
Source code for out first PHP program - Hello World.




Step 5 Save the program in the www subdirectory of your EasyPHP directory within Program Files.

Step 6 Start your web browser. In the address zone enter http://localhost/hello.php and then click to access this URL. Even if you do not have a live Internet connection you should get results similar to those shown in Figure 3.

PHP download tutorial figure 3

PHP Download Tutorial Figure 3
PHP says hello.



Step 7 Let's modify the hello.php file by adding a second echo statement which contains HTML tags. Save the modified file with the name hello2.php as shown in Figure 4.

PHP download tutorial figure 4

PHP Download Tutorial Figure 4
Source code for PHP program containing HTML tags.



Step 8 Run the modified hello2.php file as in Step 6. The results are shown in Figure 5.

PHP download tutorial figure 5

PHP Download Tutorial Figure 5
Output for PHP program containing HTML tags.





Exercises. It's a good idea to practice the basics of modifying PHP source files and running them. Try integrating different HTML tags into your PHP programs. The next tutorial is devoted to simple PHP errors.