[SOLVED] IIS Issues

BetaLeaf

Contributor
Joined
Jan 9, 2015
Posts
111
Location
http://www.betaleaf.net
Hey, I could use your help again. I am trying to move my server from Wamp 2.4.9 to IIS 10. I'm using Windows 10 x64 Home.
My problem is:
1. Server will only load from localhost and refuses to load from my public ip or my betaleaf.net domain name(Chrome says timeout.)
2. Any file I try to load from my site gives me error 404, even though the files exists. I have given the entire directory and child directories read and execute access to both "Everyone" and "IIS_IUSRS".
3. Php is not working. I have followed the instructions for IIS found at windows.php.net, but it still doesnt work.
Any help or advice would be greatly appreciated.
Jeff
 
Hi Jeff,

I have not ran PHP on IIS before so I cannot help too much in regards to settings there.

Do you have the application pools set up correctly and the directory set up as applications in IIS manager?

Once you get file access working can you run a phpinfo() command and post the results? (Feel free to redact parts of it)

It might be easiest to create a .html page and try to access that first to make sure it does not 404
 
Hi Jeff,

I have not ran PHP on IIS before so I cannot help too much in regards to settings there.

Do you have the application pools set up correctly and the directory set up as applications in IIS manager?

Once you get file access working can you run a phpinfo() command and post the results? (Feel free to redact parts of it)
Thanks for replying. I am new to IIS. I've seen application pools in the menus but idk how to set them up.
 
OK I will read it carefully. If I have any issues I will reply again. Thanks. Also, I'm using IIS 10.

Hopefully things haven't changed too much. All of the servers I manage have IIS 7 on them.

Perhaps I will set up a VM when I get home and play with IIS 10.
 
I have read your guide. I have already performed these steps correctly. Now I have a new issue. I get Error 500 when I access my domain name, betaleaf.net

That's progress.... I think.

Can you create a basic .html page and see if you can access it?

The 500 error(Internal Server Error) might either be from a config issue or from the scripts themselves.
 
I have read your guide. I have already performed these steps correctly. Now I have a new issue. I get Error 500 when I access my domain name, betaleaf.net

That's progress.... I think.

Can you create a basic .html page and see if you can access it?

The 500 error(Internal Server Error) might either be from a config issue or from the scripts themselves.
I moved the default page IIS comes with to my website. You can access it at 500 - Internal server error., altho it will still give you error 500. If I remember correctly, 5xx errors mean there is an error with the server, in this case IIS.

Edit: I keep trying to put the url as the name, but it keeps changing to 500 - Internal Server Error on its own.
 
Do you get the 500 error if you access it internally?

If you do it should be a more detailed message.

If not change your web.config file and turn on detailed errors:
Code:
<configuration>

  <system.webServer>
    <httpErrors errorMode="Detailed" />
  </system.webServer>
</configuration>

Note: you will want to turn this off or create custom error pages after everything is setup to avoid potential security issues
 
When I access it internally with localhost / iistart.htm then it gives me error 404.
I also turned on Detailed Mode
Ul741rs.png

And the Error it gives when on Detailed Mode.
aoQyzwU.png
 

Attachments

  • Ul741rs[1].png
    Ul741rs[1].png
    16 KB · Views: 3
Good and bad news....

Good: You got a good error message!
Bad: It is a PHP Config issue which means I know nothing about it :noidea:

You might try opening your web.config file and removing the <handlers> section to see if you can get the iisstart.htm page loading. (You will probably have to put it back to get php pages to execute)

If that loads then you know it is a problem with the php setup and not IIS/DNS.
 
Good and bad news....

Good: You got a good error message!
Bad: It is a PHP Config issue which means I know nothing about it :noidea:

You might try opening your web.config file and removing the <handlers> section to see if you can get the iisstart.htm page loading. (You will probably have to put it back to get php pages to execute)

If that loads then you know it is a problem with the php setup and not IIS/DNS.

Dns ik for sure is properly set-up. I was using wamp server and it works fine there, now I want to be using iis. Check back in 20 minutes.i will edit this post with my findings.
 
I removed the handle line and saved. I can now load the iistart.htm and some images from my image folder. On wordpress, I can load index.php, but trying to load any pages or posts result in a 404 error. Trying to access wp-admin results in an 500 Error. (This occured after I tried logging out and back into my blog.) Static files appear to work fine, but alot of wordpress is broken.
 
Sadly you hit my knowledge cap as I know nothing about running PHP on IIS.

If I have sometime over the next few days I might try to get it setup to test but no promises.

For now, you might want to see if you can run any php at all. (Just create a basic "Hello World" page or something similar.

If that runs correctly try running phpinfo() and see what it returns.

If no luck with either of those everything points to a problem with the php parsing.


Just a quick note, make sure you are running the same version of PHP as you did with WAMP.

PHP is known to make a lot of changes between version that can potentially break an entire site.
 
Sadly you hit my knowledge cap as I know nothing about running PHP on IIS.

If I have sometime over the next few days I might try to get it setup to test but no promises.

For now, you might want to see if you can run any php at all. (Just create a basic "Hello World" page or something similar.

If that runs correctly try running phpinfo() and see what it returns.

If no luck with either of those everything points to a problem with the php parsing.


Just a quick note, make sure you are running the same version of PHP as you did with WAMP.

PHP is known to make a lot of changes between version that can potentially break an entire site.
I have next to no knowledge of php. ik a few commands, but nothing that can accomplish what you are asking. I'm using wordpress cus a friend told me it was easy to set up. LOL.
 
just create a page with the following code: (Make sure it ends with a .php extentsion)

Code:
<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php echo '<p>Hello World</p>'; ?> 
 </body>
</html>

Then navigate to it.

If php is working you should see: "Hello world!"

If that works edit the page and change it to:
Code:
<?php
phpinfo();
?>

This if it works should generate a page with almost all your PHP settings on it.
 

Has Sysnative Forums helped you? Please consider donating to help us support the site!

Back
Top