[Last Call] Learn how to a build a cloud-first strategyRegister Now


Why would my PHP code not appear in IE

Posted on 2008-11-11
Medium Priority
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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
echo 'Hello World!'; 

Open in new window

Question by:Michael Williams
  • 3
  • 3

Expert Comment

ID: 22931283
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.  

Assisted Solution

SreejithG earned 400 total points
ID: 22931318
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

by:Michael Williams
ID: 22931560
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.
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Accepted Solution

k_dietz earned 1600 total points
ID: 22931664
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

by:Michael Williams
ID: 22931755
I will try the manual installl. Should I do a Remove Program on the PHP ?

Assisted Solution

k_dietz earned 1600 total points
ID: 22932030
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

by:Michael Williams
ID: 22932776
I used a combination of the suggestion by k_dietz: http://us.php.net/manual/en/install.windows.manual.php

And the following link: http://www.peterguy.com/php/install_IIS6.html

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 !

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses
Course of the Month18 days, 7 hours left to enroll

826 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