Avatar of Debra Turner
Debra Turner
Flag for United States of America asked on

I need help setting up an IIS website with PHP, I forgot how to set it up correctly and import files into the site.

I need to set up an IIS site (with PHP already installed) and import some forms to be accessed through the browser. It's been two years since I've used IIS and I have forgotten how to correctly set up a new website. (What port to use, making sure PHP is installed correctly using the PHP Manager, how to import the PHP forms created by one of our faculty members, make sure it is accessible on the web, etc.) Any help will be appreciated.

I don't think I set it up correctly - Hoping it will be accessible through: https://casweb.memphis.edu/msci-forms

Thanks,
Debra
PHPMicrosoft Server OSMicrosoft IIS Web ServerWeb Servers

Avatar of undefined
Last Comment
David Johnson, CD

8/22/2022 - Mon
Scott Fell

There are multipl parts to your question and it may be best to work on just one at a time.


The default is to use port 80.  Are you using a panel like Plesk?
Scott Fell

I found it helps to download iis express locally to play with before making any changes to your live server too https://www.microsoft.com/en-us/download/details.aspx?id=48264.  You can quickly make changes and go through the gotcha's, then apply to the live server.
Debra Turner

ASKER
I installed the Windows Express 10 - now what? I'm not able to access it to make any changes. Where do I find it?
Sorry to be such a dunce - I'm a Web person, not so much a server guru.
debra
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Scott Fell

You have the Windows Express version on your local computer right? and not your web server.
Debra Turner

ASKER
Thanks Scott Fell,
I had a project that fell on my desk that took precedence over this - I'm working on this now. I appreciate your insight. I've downloaded to my local and will let you know how it goes!
Debra
Debra Turner

ASKER
I've downloaded the IIS to local and now I'm not sure how to access it to work with it. Express in control panel
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Debra Turner

ASKER
I don't see it in Features to turn on or off - and i don't see in the system tray. How do I access it?
As I google, I'm seeing references to WebMatrix and Visual Studio. Do I need either of these to use the Express?

Thanks for your help - I'm totally lost.
debra
Scott Fell

In windows 10, use the search bar on the lower left and just type, "iis" and you should see your program.  That will bring up the IIS interface.

You do not need webmatrix or visual studio.  IIS is to create a local web server.

Once you can see the iis interface, there are 3 columns. Connections on the left, Actions on the right and the middle shows all of the features.  Under Connections, the top item will probably be the name of your computer.  Select that. On the right under actions, you will see "Restart", "Start" and "Stop".  If IIS is not running, the "Start" will be lit up in green. If it is, click Start.

Now expand the Connections column and you should see, Application Pools and Sites. Expand Sites. Now you should see "Default Site".  Select Default Site.  

On the right under Actions, you will see Bindings and Basic Settings.  Click on Bindings and that should show you http and port 80.  Clicking on Basic Settings will show you the physical path of the site. If you are not sure where it is, close and on the top of the Actions column is a link to Explore. That will open up your windows explorer.

Next, in a browser, type "localhost" and you should see a default IIS site.   The location of my default site is C:\inetpub\wwwroot

See if you can get that far.
Debra Turner

ASKER
I keep getting the same window to install or repair. It goes to Finish and then I don't see it anymore... what am I doing wrong? I've gone through set up 3 times.

And I just Removed it and reinstalled it and it is still coming up install or repair when I search.
debra
Capture.PNG
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Scott Fell

From your previous screen shot https://www.experts-exchange.com/questions/29128148/I-need-help-setting-up-an-IIS-website-with-PHP-I-forgot-how-to-set-it-up-correctly-and-import-files-into-the-site.html?anchorAnswerId=42750321#a42750321 you already have it installed.

If you go to the control panel, and in the searc at the top right, type in "add" and you will see Programs and Features. Click on Turn Windows Features On or Off.  You should see Internet Information Services

Capture.JPG
Scott Fell

Make sure Internet Information Services is turned on as shown.
Scott Fell

If IIS is turned on, then you should be able to go to your search on the lower left corner of your computer and type, "iis".  You are looking for "Internet Information Services" with the words, "Desktop App"  under it.  On the top of that window on the left, click on the top left icon to only search for apps.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Debra Turner

ASKER
I had looked at that earlier and was looking for IIS Express, I should have known. Now I see it. Duh to me! I'll go through the rest of the steps and get back with you.
Thanks!
debra
Debra Turner

ASKER
That was it - I'm that far now and can see localhost in browser.

Now I'm looking at the 'modules' for Authentication, Compression, etc and the Configuration Editor (in the middle column).

There is no php on this version so I have to install it, right?
debra
Scott Fell

Once you get the default iis page by going to http://localhost - the next step is to figure out where the site is located, as noted, probably C:\inetpub\wwwroot.  


Making sure to remove the image and html file, in that directory, try adding your own html file  and surf to it.
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>test</test></title>
</head>
<body>
  <p>Hello World</p>
</body>
</html>

Open in new window


Once you feel comfortable with that working, install php.
https://docs.microsoft.com/en-us/iis/application-frameworks/scenario-build-a-php-website-on-iis/configuring-step-1-install-iis-and-php
and run a new test file
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>test</test></title>
</head>
<body>
  <p><?php echo "Hello World";?></p>
</body>
</html>

Open in new window


If that is working as expected, remove the test files and copy all of your site files to the new location. If you are using Wordpress or another CMS, you will also need to install MySQL and or MSSQL Server and start working through your errors.

You may have to update things like file permissions on some folders
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Scott Fell

This will at least give you an idea on how to update IIS on the live server.  While this simple example will get you running, the bigger issue is going to be security.  Securing a production webserver will be more complex than setting up a development server.  

Because you are tasked with setting up IIS, that part may not be in place. At least you can get it up and running. I would suggest asking another question here on securing your server and that will take a different type of Expert. I can help you up to here and with any html/php programming.
Debra Turner

ASKER
I am having problems now with permissions. It won't allow me to save a document into the directory (from Dreamweaver). But it let me copy and paste an image. How to I make sure I have administrator permissions?

Yes, I need to look into security, although I did add the SSL almost two years ago (I haven't done anything with this server since then.) I was working on a Code Igniter application back then.

It's amazing how much I have forgotten. But it is coming back to me a little.
Debra Turner

ASKER
And I can see the image in the browser under localhost (and I see it in the Content View in Middle column)
debra
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Scott Fell

It won't allow me to save a document into the directory (from Dreamweaver)

It has been a long time since I used dreamweaver. From memory, you have options for adding multiple remote sites for Live and Development. You also have the option of how you transfer files including network and ftp.   For local/dev, you want to use network I believe.
ASKER CERTIFIED SOLUTION
Scott Fell

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Debra Turner

ASKER
Still working on this. I'll get back with you tomorrow with some questions. And once I do this, I'll add those files to the actual server. You are right about the security!
debra
Debra Turner

ASKER
Why doesn't the IIS Express have the PHP manager tool/module?  Or the Web Platform Installer - I'm spoiled to just using it to install everything.  How do I get it? Or is there an easy way to install the php into the IIS.
Debra
Your help has saved me hundreds of hours of internet surfing.
fblack61
Debra Turner

ASKER
PHP 7.0 is already installed on the production server I'll be using.

BTW- I'm submitting a 'Secure my server' question today.

Thanks for all of your help!
Debra
SOLUTION
Scott Fell

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Debra Turner

ASKER
Hi again,
I've taken a few days and worked on this server issue I'm having. The forms are showing up on my local system now (and I can pull up the main page on production).

https://casweb.memphis.edu:80/MS-Form-Index.html

It's making me add the ":80" port number to the url. Do you know why?

Thank you for your help,

Debra
Debra Turner

ASKER
Now my forms are working on production, but still having to add the :80.

https://casweb.memphis.edu:80/index.html

I appreciate any advice.
Debra
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
David Johnson, CD

memphis.edu uses apache web server
casweb.memphis.edu:80 uses iis

My thinking it has something to do with the memphis.edu networking team and they added the port to the forwarding section
You only have the


Small quibble:

you can get rid of the name/link column
2018-12-11_18-37-47.png all you need is 2018-12-11_18-15-29.png
<a href="advisorchange.php">Change of Advisor</a

Open in new window

Debra Turner

ASKER
Good morning,
I'm not sure I understand what you mean on this response. The IIS is on Windows Server 2012 R2. It's maintained by the IT division and is separate from the main site (I believe).

I've had a site on the IIS before and didn't have this issue. I think its a setting in the bindings where I've made the blunder (attachment).

And the forms were designed by a faculty member, so I'm just the one who uploads them to the server. I don't understand how dropping a column from the form would make a difference.

Thank you for your response. And please forgive my lack of understanding!
Debra
bindings-settings.PNG
Debra Turner

ASKER
Thank you both for helping me. I'm sure i'll have other questions as I go along. I'm still working on hardening the security, and I'm waiting on the university to whitelist the server so i can use the smtp server to send the mail, but things are looking good.
Seriously glad I found Experts Exchange. I've been helped many times.
debra
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
SOLUTION
Debra Turner

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
David Johnson, CD

No functional difference just you can combine the link and the description.