The Slim Framework support forum has moved to http://discourse.slimframework.com. This Tender forum is no longer maintained or monitored.

404 Error when using Slim app on IIS6 w/ Windows Server 2003

nimblehost's Avatar

nimblehost

03 Jan, 2012 03:49 AM

I have a user who's trying to use a Slim-based web app we built with a Windows box running IIS6 (they don't have the option to switch to *nix hosting). They've installed the Helicon APE module, which enables IIS6/7 to support Apache rewrite rules "as is", and they have mapped the file extensions correctly, as per this document on the Helicon site:

http://www.helicontech.com/ape/doc/mapping2003.htm

So, as far as I can tell, they have an environment that our Slim app should be compatible with (yes, they do have PHP 5.2+). However, we're getting a 404 error when trying to access the Slim-based portion of the app. I've tried altering/removing the RewriteBase line of the .htaccess file without success. Here are the relevant links:

User facing portion of the site: http://www.video-newengland.com/page1/index.php
Slim-based backend portion: http://www.video-newengland.com/page1/files/armadillo/

When accessing the Slim-backend, you'll be redirected to a "setup" page (since the app hasn't been setup yet) - at which point the 404 Error occurs. Does anyone have any suggestions as to what the problem may be?

  1. 1 Posted by nimblehost on 03 Jan, 2012 04:21 AM

    nimblehost's Avatar

    For reference, here is the content of the .htaccess file:

    RewriteEngine On
    
    # Some hosts may not need the `RewriteBase` line below.
    # To disable the `RewriteBase` rule, comment out (or delete) the line
    # To comment out the line, simply type in a # sign before `RewriteBase` and save the file.
    
    RewriteBase /page1/files/armadillo
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php [QSA,L]
    
  2. Support Staff 2 Posted by Josh Lockhart on 03 Jan, 2012 12:54 PM

    Josh Lockhart's Avatar

    Hey Jonathan,

    Which version of the framework are you using? At first glance, I'm not sure what is happening. Can you send me an example application (as simple as you can make it) that still demonstrates the issue? Otherwise, I'd suggest you start adding echo() statements in Slim's run() method and compare the raw HTTP request with the app's Request object and make sure everything looks correct.

    Best,
    Josh

  3. 3 Posted by nimblehost on 03 Jan, 2012 08:16 PM

    nimblehost's Avatar

    Thanks Josh. We're using (I believe) Slim 1.5.1. I've attached a very simple Slim app that reproduces this. I've also uploaded it to the client's Windows server here:

    http://www.video-newengland.com/test/

    Accessing that page will redirect you to http://www.video-newengland.com/test/success/ - and the Slim redirect works properly, but shows a 404 Error.

    I'm not so sure this is Slim related, but am having a heck of a time figuring out the cause and how to fix it. I'll also try adding 'echo()' as you've suggested.

  4. Support Staff 4 Posted by Josh Lockhart on 12 Jan, 2012 12:44 AM

    Josh Lockhart's Avatar

    Hmm... my best guess is that this is related to URL rewriting... looking at the raw HTTP response for http://www.video-newengland.com/test/ indicates the Slim app is not even being touched by the request. That's really all I can do other than question your choice in web servers ;-)

  5. 5 Posted by nimblehost on 12 Jan, 2012 04:28 AM

    nimblehost's Avatar

    Roger that. I'm trying to get access to the Helicon APE error logs in the hope that will shed more light on the situation.

    And yeah, IIS. That's the first thing I asked the customer - if they could switch. :-P

  6. Support Staff 6 Posted by Andrew Smith on 31 Jul, 2012 05:08 PM

    Andrew Smith's Avatar

    Ok I am closing this one out, I think it was answered.

  7. Andrew Smith closed this discussion on 31 Jul, 2012 05:08 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac