Link to home
Start Free TrialLog in
Avatar of Debra Turner
Debra TurnerFlag 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
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

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?
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.
Avatar of 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
You have the Windows Express version on your local computer right? and not your web server.
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
I've downloaded the IIS to local and now I'm not sure how to access it to work with it. User generated image
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
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.
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
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

User generated image
Make sure Internet Information Services is turned on as shown.
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.
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
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
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
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.
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.
And I can see the image in the browser under localhost (and I see it in the Content View in Middle column)
debra
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
Avatar of Scott Fell
Scott Fell
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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
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
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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
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
User generated image all you need is User generated image
<a href="advisorchange.php">Change of Advisor</a

Open in new window

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
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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No functional difference just you can combine the link and the description.