Why would my PHP code not appear in IE

Posted on 2008-11-11
Last Modified: 2013-12-13
Let me first say I am VERY new to PHP development, that being said.

I have IIS running on my machine and have installed PHP 5.2.6 (Installer).

I then go to Dreamweaver CS3 and create a new PHP form and nothing displays in IE. Please let me know if you need additional information in your assistance. Below is a copy of what I'm trying to run. Remember Hello World : )
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">


<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>




echo 'Hello World!'; 




Open in new window

Question by:fantasycommish
    LVL 6

    Expert Comment

    It's hard to tell because I can't see your IIS or PHP config, but have you checked to make sure that the PHP file extension ends in the same extension listed in your Website Extensions?

    IIS Manager - Website Properties - Home Directory.  Click configuration next to Application Settings.  In the Application list, is .php listed?  If so, is your Hello World document called filename.php ?

    Also in IIS Manager, under Web Service Extensions, make sure that your PHP ISAPI (or CGI) extension is set to allowed.  
    LVL 3

    Assisted Solution

    Please make sure that you have done application mapping for .php extension

    Please follow the below steps.
    1. Open "Internet Information Services" from Control panel -> Administrative tools
    2. Right click on "Default wb site" in the left pane and click on properties
    3. Select "Home Directory" tab
    4. Click on "configuration " button
    5.In the mappings tab click on add button.
    6. Select php.exe as executable and give .php as extension.
    8 Press OK to close each dialogs
    9 Restart IIS
    10. Now access your php page.

    Author Comment

    I went through your steps and I put the following in the dialog box.
    Executable: "C:\Program Files\PHP\php5ts.dll" Files\PHP\php.exe  (I browed for the dll, Files\PHP\php.exe was added)

    Extension: .php

    I left the rest the same. Restarted the server and received a 500 error.

    Not sure where the web service extensions are. I did find a tab called ISAPI Filters. This is currently emplty. There is a button for adding a filter but not sure if this is what I should do.
    LVL 6

    Accepted Solution

    Not to conflict with what SreejithG is saying, but if you can, use the ISAPI extension (php5isapi.dll) rather than the CGI (php.exe) because it's more secure and has a lower load on the server.

    You can find Web Service Extensions in IIS Manager under your Server  (alongside Application Pools and Web Sites).

    If you don't see PHP anywhere in this list, then your installation did not complete successfully.

    Do you see a .php extension listed in your Application Settings?  (IS Manager - Website Properties - Home Directory.  Click configuration next to Application Settings.)

    If not, then PHP -definitely- didn't install correctly.  I'd recommend following the manual installation steps (google php installation on iis manually) which is relatively painless for a guaranteed install.

    Author Comment

    I will try the manual installl. Should I do a Remove Program on the PHP ?
    LVL 6

    Assisted Solution

    I'm not sure if it's necessary, because you will be doing all of the steps that PHP Installer would have done anyway, BUT... it would be best to start with a clean slate, so go ahead and uninstall.  That way if the installer messed anything up, it'll undo.  

    Good Luck! :)

    Author Comment

    I used a combination of the suggestion by k_dietz:

    And the following link:

    1. Install PHP section
    I did everything asked except for moving the php5servlet.dll file. It wasn't there.

    2. Configure PHP section
    I did everything except for the following 2 things:
    * 2.3 Create a session state folder and point the session.save_path php.ini variable to it
    * Massage the list of extensions

    3. Configure IIS section
    I didn't do 3.1 Add and allow the PHP ISAPI Extension to IIS Web Service Extensions: C:\PHP\php5isapi.dll  because I couldn't locate web services with my version of IIS : )

    In 3.2 Add new extension (.php) I put C:\PHP\php5isapi.dll as the executable.

    Everything seems to be working now. Thank you both for your help and it appears my subscription to EE is already paying off : )

    Thanks again !

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now