Getting Started with PHP

If you want to set up your Windows computer to test PHP pages, you will need to set up IIS first.  When I had Windows XP, I had to buy the Professional version of the operating system to get IIS.  IIS is included in Windows 7 Home Premium. You can find instructions for setting up IIS here:  Setting Up IIS 7.0 by Microsoft TechNet.  When you get done, you should have an inetpub directory in your hard drive’s root directory, and there should be a wwwroot directory within that (C:\inetpub\wwwroot).  The wwwroot directory is where you will put your HTML pages, your PHP pages, and anything else you want to test locally on your Web Server.

At this point, you can test to make sure that standard HTML pages are working properly.  You will need to know your computer’s name for the URL to your local pages.  Go to the computer’s Control Panel.  Click on “System and Security”.  Click on “System”.  Your computer’s name should be listed on that page.  If you have an HTML test file named test.htm in your wwwroot directory, your URL for your browser should be: http://COMPUTERNAME/test.htm

<html>
<body>
<h1>Hello, world!</h1>
<p>This is a test of HTML.</p>
</body>
</html>

You can find the binaries on the PHP For Windows: Binaries and sources Releases page.  If you know the version of PHP that your Internet Service Provider (ISP) is using, it might be a good idea to install the version to match theirs.  The ISP for a site I set up for a friend recently upgraded their PHP installation, and there were some changes that had to be made to make the site run properly on the new version.  I’ll discuss some of the changes I needed to make in a future post.  Having matching versions can help prevent problems, at least until your ISP decides to upgrade.

You can find the instructions at the PHP: Installation on Windows systems – Manual page.  The two Windows Installer links will tell you how to install the binaries according to the version you have decided to use.  The installation process should set up the options in IIS that are needed for PHP to run.  If PHP does not run after installation, the Microsoft IIS links on the PHP: Installation on Windows systems – Manual page should help you get going.

Once you have PHP installed, you can test it.  You can use a simple file such as phpinfo.php in your wwwroot directory containing the following:

<html>
<body>
<?php phpinfo(); ?>
</body>
</html>
This entry was posted in PHP and tagged , . Bookmark the permalink.

One Response to Getting Started with PHP

  1. teresa says:

    Thanks for the info. I am considering getting a android phone and a new phone plan. I have a talk only att $35 plan really old. I read the SB Tech groups stuff since i live in RB 90277. I have not been able to go to meetings cause of some medical stuff. I have a friends old Optimus Q android that was on straight talk but dont think i will use on new plan. I was looking at metros pcs, Virgin $35, tmobile $30 plans , and other off shots like h20. do you have any recommendations and other info? I looked around at youtube etc.and wifi use to make phone calls. i have a magic jack at home and slow dsl.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>