• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 386
  • Last Modified:

Running PHP on IIS6

hi i am currently struggling to get a simple php form to work with my website,

i have installed php using the windows installer but very time i browse to my php page my web browser asks if i want to download or save the file,

please help??

john
0
pepps11976
Asked:
pepps11976
  • 9
  • 4
  • 4
  • +1
2 Solutions
 
Aaron TomoskyTechnology ConsultantCommented:
I suggest stopping tryin to install php. Download xampp, it has php and all that stuff included. Either use a different port than 80 since you have iis running, or turn off iis. This can be dome by stopping the www service.
0
 
pepps11976Author Commented:
Ok Let me tell you exactly what i have then you can suggest the best way forward

I have about 6 websites hosted using IIS most of these sites are run in .asp

however i have one site that has a contact form and the mail handler for that form is in php, so i would like to be able to keep what i currently have working, but just give it the ability to still process this php form

i have been struggling with this for days

hope you can help

i might also add i am a newbie when it comes to iis and php

john
0
 
Aaron TomoskyTechnology ConsultantCommented:
Xampp is for development, I would recommend it for external facing websites. I can't help with php on iis 6 as I think that's a Ba idea so I don't have experience with it.
I would suggest going to turnkeylinux.org or one of the many other sites with premade lamp (Linux, apache, php, mysql) virtual machines. Use virtual box or vmware to run that. This way you have one server with iis and asp and the second, virtual, server running apache and php.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Ahmed MerghaniCommented:
Hi john,

I think this link can be useful:

http://www.iisadmin.co.uk/?p=4
0
 
pepps11976Author Commented:
yes i have tried that link but i still cannot get it working

can anybody clarifi is it possible to have .php and .asp aswell as html etc all running on iis together?
0
 
Dave BaldwinFixer of ProblemsCommented:
I have PHP running fine on IIS5.1 on my computers and on IIS7 on my Godaddy account with Windows Server 2008.  You do have to configure it correctly though in IIS.  This site is all about it and include a link for PHP on IIS6: http://php.iis.net/
0
 
Ahmed MerghaniCommented:
Can you tell us the step you have done in mote details?
0
 
pepps11976Author Commented:
so far all i have done is run the windows installer which i downloaded from the php site, i also installed fast cgi.

now if i browse to a php page on my site like www.site.com/test.php i get windows explorer asking me if i want to download or open the file.

the reason i am trying to add php to iis6 is because i downloaded a web template that has a contact form written in php

so i need to be able to run php from iis6 which is my webserver

john
0
 
Ahmed MerghaniCommented:
I do not think you need to install fast cgi!
Anyway, after finish the installation, you need to change the parameter "extension_dir" in the php.ini to the right one. After that you need to add some Environment Variables.
0
 
pepps11976Author Commented:
ok any chance you could talk me through what i need to download etc and what i need to change.?

i am new to this and i have been struggling for days so if you could help me i would be forever gratefull.

john
0
 
Dave BaldwinFixer of ProblemsCommented:
Fast-CGI is recommended for PHP on Windows.  This page http://learn.iis.net/page.aspx/247/using-fastcgi-to-host-php-applications-on-iis-60/ shows steps to enable PHP on your site.  Sounds like you don't have the "application mapping" correct yet.
0
 
pepps11976Author Commented:
ok i will install that can you point me to the correct version for the php installer aswell?

john
0
 
Dave BaldwinFixer of ProblemsCommented:
I thought you already had PHP installed.  This http://www.microsoft.com/web/platform/phponwindows.aspx is the Microsoft page for installing PHP on IIS.  It has instructions for configuring it for the different versions of IIS also.  You probably want PHP 5.2.17 though make sure you select the 32-bit or 64-bit version according to your server setup.
0
 
pepps11976Author Commented:
ok i will post my results

thanks again
0
 
pepps11976Author Commented:
ok thanks for the links

i have installed from the links that you have sent me and all seems to have installed correctly.

now if possible can you advise me on how i can get my contact form to work, do i need to install anything else so when someone submits the contact form i then can recieve the email?.

i have the forms all ready but this was my initial problem

thanks again for all your help

john
0
 
Ahmed MerghaniCommented:
Can you post the email sending code part?
0
 
pepps11976Author Commented:
ok this is the contact form this was part of the template that i bought

<form action="/bin/MailHandler.php" method="post" name="contact-form" class="main-contacts" id="contact-form">
<fieldset>
															<input type="hidden" name="owner_email" id="owner_email" value="john.pepper@testsite.com" />
															<input type="hidden" name="serverProcessorType" id="serverProcessorType" value="php" />
															<input type="hidden" name="smtpMailServer" id="smtpMailServer" value="localhost" />
															<input type="hidden" name="stripHTML" id="stripHTML" value="true" />
						
										
                  	<div class="rowElem">
						<b>Enter your Name:</b>
						<div class="bg">
							<input type="text"  name="name" id="name">
						</div>
						<label class="error" for="name" id="name_error">*This field is required.</label>
						<label class="error" for="name" id="name_error2">*This is not a valid name.</label>
					</div>
                   	<div class="rowElem">
						<b>Enter your E-mail:</b>
						<div class="bg">
                    		<input type="text"  name="email" id="email" value="">
                   		</div>
						<label class="error" for="email" id="email_error">*This field is required.</label>
						<label class="error" for="email" id="email_error2">*This is not a valid email address.</label>
					</div>
                   <div class="rowElem">
				   		<b>Enter your Phone:</b>
						<div class="bg">
                      		<input type="text" name="phone" id="phone">
                   		</div>
						<label class="error" for="phone" id="phone_error">*This field is required.</label>
						<label class="error" for="phone" id="phone_error2">*This is not a valid phone number.</label>
					
					</div>
                    <div class="textarea-box">
						<b>Enter your Message:</b>
						<textarea rows="1" cols="1" name="message" id="message"></textarea>
						<label class="error" for="message" id="message_error">*This field is required.</label>
						<label class="error" for="message" id="message_error2">*The message is too short.</label>
					</div>
                    <div class="clear"></div>
                    <a href="#" class="link" id="clear">Reset</a> 
					<label></label>
					<input type="submit" name="sub" value="Submit" class="link">


				</fieldset>
                </form>

Open in new window


can you also confirm there are two peices of text at the bottom which are RESET and SUBMIT do i also need to link the SUBMIT to the mailhandler.php which is what the form is set to?

John
0
 
pepps11976Author Commented:
Its ok i got it all working thanks for all your help on this guys
0
 
Dave BaldwinFixer of ProblemsCommented:
You're welcome, glad to help.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 9
  • 4
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now