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
Debra TurnerWeb Specialist IIAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
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, EE MVEDeveloper & EE ModeratorCommented:
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 TurnerWeb Specialist IIAuthor Commented:
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
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
You have the Windows Express version on your local computer right? and not your web server.
Debra TurnerWeb Specialist IIAuthor Commented:
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 TurnerWeb Specialist IIAuthor Commented:
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
Debra TurnerWeb Specialist IIAuthor Commented:
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, EE MVEDeveloper & EE ModeratorCommented:
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 TurnerWeb Specialist IIAuthor Commented:
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
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
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#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, EE MVEDeveloper & EE ModeratorCommented:
Make sure Internet Information Services is turned on as shown.
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
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.
Debra TurnerWeb Specialist IIAuthor Commented:
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 TurnerWeb Specialist IIAuthor Commented:
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, EE MVEDeveloper & EE ModeratorCommented:
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
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
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 TurnerWeb Specialist IIAuthor Commented:
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 TurnerWeb Specialist IIAuthor Commented:
And I can see the image in the browser under localhost (and I see it in the Content View in Middle column)
debra
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
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.
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Yes, I need to look into security, although I did add the SSL almost two years ago

I was referring to tightening the server for hacking attempts. But for HTTPS, a certificate is valid for only 2 years.  You will probably need to install another Cert on the live server.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Debra TurnerWeb Specialist IIAuthor Commented:
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 TurnerWeb Specialist IIAuthor Commented:
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
Debra TurnerWeb Specialist IIAuthor Commented:
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
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
You can download the web platform installer from the iis site https://www.microsoft.com/web/downloads/platform.aspx

The key with the local development is to offer a playground to learn what to do on the production site.

Right now, your site https://casweb.memphis.edu/ does not appear to be connected, it just times out and confirmed by ping casweb.memphis.edu/

Once you get get it connected, the next step is to make sure you have default documents set up such as index.php and folder permissions.
Debra TurnerWeb Specialist IIAuthor Commented:
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 TurnerWeb Specialist IIAuthor Commented:
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
David Johnson, CD, MVPOwnerCommented:
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 TurnerWeb Specialist IIAuthor Commented:
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 TurnerWeb Specialist IIAuthor Commented:
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
Debra TurnerWeb Specialist IIAuthor Commented:
Hi all,
I figured out the part for appending the port number.  The site uses https which is the 443 port. I was using 80 port for https so the server was appending the port number.

Thanks to everyone for your patience and help.
Debra
David Johnson, CD, MVPOwnerCommented:
No functional difference just you can combine the link and the description.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.