#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0

    Random 404 errors


    Hi,

    I have IIS running off a server (2008 R2 I think) on our local network. I'm able to view my PHP pages, but whenever I refresh any page other than my index.php page, I get a 404 error, and I have to go back to my index.php page to click on the link to go to the page I want to go to. And even then, sometimes my index.php page give me this error. These are all PHP files. I can view the PHP pages whenever it doesn't give me the 404 errors, so PHP is installed.

    Is something not set right?
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,439
    Rep Power
    4539
    It sounds like your php may not be installed correctly in IIS. It doesn't sound like an IIS problem, check your server error logs for clues.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0
    This is the guide I used to install PHP: (Can't post URL's.... Ok, search for install php iis7, then it's the fourth link. Then the red text, there is a link for Installing PHP on IIS7 Fast-CGI)

    Here's my PHP config file (Ok, since I can neither paste the whole thing or a URL to pastebin, the config file is at pastebin/vhVCaFsS

    And here's my log file: pastebin/kmk7BYEE
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,439
    Rep Power
    4539
    So did you see anything questionable in your server logs? Did you review your http logs to see what the request was that caused the 404? You can find more information on errors in the iis online help. There are at least two logs involved, the windows event logs and the w3svc IIS logs. Review them both.

    As far as setting up php with IIS7, I have no clue. There is some documentation available in your php download and at php.net

    PS - you posted links that are only local to your machine.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0
    Originally Posted by Doug G
    PS - you posted links that are only local to your machine.
    Since I have a new account, I'm not allowed to post URLs. Those links go to PasteBin.

    www.pastebin DOT com SLASH vhVCaFsS
    www.pastebin DOT com SLASH kmk7BYEE
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0
    YES!!!

    Basically I needed to go to Handler Mappings > PHP > Request Restrictions > Invoke handler only if request is mapped to: > File

    No more 404 errors!!
  12. #7
  13. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,439
    Rep Power
    4539
    Thanks for posting your solution!
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo