ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

"No file input specified" error on Fat Cow hosting

November 15, 2012 9:00pm

Subscribe [2]
  • #1 / Nov 15, 2012 9:00pm

    Stephan Tran's avatar

    Stephan Tran

    7 posts

    I have a site hosted on Fat Cow that doesn’t behave as expected. In my local environment (MAMP) everything was working perfectly. The uris are set with the pages module, index.php removed with htaccess (ie domain.com/mypage), and the nav is static, so the setup is pretty simple. Prior to the site transfer, everything checked out on the server wizard. After everything was transferred over to Fat Cow, only the home page appeared, and other pages showed the “no file input specified” error or the home page template. Thankfully I was also able to get the pages url to work as long as they are prepended by “index.php/” which is for some reason not being removed by the htaccess (i.e. domain.com/index.php/mypage).

    I believe this problem is the rooted in the path_info issue referenced in this thread: http://ellislab.com/forums/viewthread/130554/

    As suggested in the thread, I called Fat Cow, and they were extremely unhelpful. I was told that customers can edit their php.ini files and htaccess files, but support doesn’t cover that sort of thing. I also tried enabling query strings, which didn’t seem to do anything so I turned it back off. Both with and without query string enabled cannot even view the entries at the pages url or even view the templates using the default EE template url structure.

    I haven’t been able to find much on solving this problem, but I did find one thread for someone who had a similar issue with Concrete 5: http://www.concrete5.org/community/forums/installation/varphp_sessions_and_path_info_or_orig_path_info_fatcow_hosting_e/. I tried changing php.ini as suggested in the tread, and that has not worked.

    Right now the site is up and running with 301 redirects on the url to force the index.php/ back in to get around the error. Fortunately this is a small site, but the current set up is not a long term option. Any help getting this resolved would be great, since we would like to avoid changing hosting.

  • #2 / Nov 19, 2012 4:02pm

    Dan Decker

    7338 posts

    Hi Stephan,

    You need to update your .htaccess to include the “?”

    <IfModule mod_rewrite.c>
            RewriteEngine On
    
            # Removes index.php
            RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteCond %{REQUEST_FILENAME} !-d
            RewriteRule ^(.*)$ /index.php?/$1 [L] #note the ? after index.php
    
            # If 404s, "No Input File" or every URL returns the same thing
            # make it /index.php?/$1 above (add the question mark)
    </IfModule>

    Your server on Fat Cow is expecting the “?” to be part of the QUERY_STRING sent to the server.

    Give that a go and let me know the result.

    Cheers,

  • #3 / Nov 24, 2012 11:03am

    Shawn Dai's avatar

    Shawn Dai

    76 posts

    I had the same “No file input specified” error after migrating from Media Temple (dv) 3.5 to 4.0.

    The “?” in the .htaccess file solved the problem. Thanks Dan.

  • #4 / Nov 24, 2012 1:39pm

    Shawn Dai's avatar

    Shawn Dai

    76 posts

    Dan, on a related note ... after I add the “?” to .htaccess, the 301 Redirects are appending “?/old/resource” to the new redirected URL.

    For example, I have this .htaccess directive on https://domain.com:

    Redirect 301 /member/profile <a href="https://subdomain.domain.com/account">https://subdomain.domain.com/account</a>

    And the URL is written as “https://subdomain.domain.com/account?/member/profile”.

    Any idea of how to get rid of the “?/member/profile” part?

    My complete .htaccess file looks like this:

    DirectoryIndex index.php index.html
    
    # ExpressionEngine mod_rewrite to remove "index.php"
    RewriteEngine On
    Options +FollowSymLinks
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1
    
    # ExpressionEngine member themes redirects
    Redirect 301 /member/profile <a href="https://subdomain.domain.com/account">https://subdomain.domain.com/account</a>
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases