Skip to content

Keep getting "No input file specified" #36

mariusbratu opened this Issue Mar 25, 2012 · 7 comments

3 participants


Hi there,

After a lot of searches i stumbled upon this great rest server and figure it out in minutes that this is exactly what i needed for my project.

Only problem is i can't make it work as expected. I have uploaded it on a server on goddaddy and when i try to access something like or i get a 404 Not Found and in browser it says No input file specified.

Also when i try to access i get a 404 Not Found, and in browser says Firefox can't find the file at

Then i said that maybe its better to try with one of your samples out of the box, but i get same behavior. You can see it here

I think it has something to do with the .htaccess file, but i cant figure it out by myself whats wrong there. Or maybe some problem in server configuration, not sure.

Please help me to figure it out this problem.

Kind Regards,
Marius Bratu.


I made things a little more simpler. On first example i had other stuff loaded into User class.
Now you should call and you will get "No input file specified."

Have tested this on my localhost and there things are running just fine. So i am pretty sure its something wrong with server configuration but i just dont know what.

Here are the files im using:


require_once 'restler/restler.php';
require_once 'user.php';

#set autoloader
#do not use spl_autoload_register with out parameter
#it will disable the autoloading of formats

$r = new Restler();



class User {
        function hello($to='world') {
              return "Hello $to!";


DirectoryIndex index.php
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^$ index.php [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]
<ifModule mod_php5.c>
    php_flag display_errors Off

Hi @mariusbratu, welcome :-)

I've done some googling on your issue and it seems to be a server configuration issue.
Im not completely sure yet what it exactly is but seems to be related to php running in cgi mode.

Perhaps you can ask the administrator of the server to check the logs :-)



@mariusbratu thanks for the complements :)

Regarding your issue "No input file specified." means that PHP engine is executed but it could not find which php script to execute

This is usually happens only on Nginx. But I know you are running Apache

I noticed that

Which could be the root cause of this problem. I suggest you host api in a subdomain or a subfolder that is not pointing to launch rock


@Luracast Luracast closed this Mar 25, 2012

Hi there,

Really thanks for your fast answer and for the hint. Indeed that was the problem, and let me post the fix here for anyone else going into this trouble in the future.

This applies for a GoDaddy account, not sure if it works same for other hostings. You will need to create a php5.ini file in your root directory and add this line to it cgi.fix_pathinfo = 1. If the file it's already created you simply add that to it.
Note that you may need to wait some time till the new php5.ini file its being loaded.

Marius Bratu


@mariusbratu glad to help :)

Thanks for contributing back to restler community, this is the sprit that keeps us growing!

We are currently working on Restler 3 and discussing about the features in #22 do take part and help us to make Restler even better!


@Luracast Once i get more used to Restler and based on my own needs i will be more than happy to make some suggestions:)


Here is another suggestion from a restler user for improving .htaccess in case it does not work for you. I'm pasting it here as it may help some one

First thanks for an wonderful tool you've developed. I had issue with the .htaccess file that it was not redirecting properly. After googling i found a small change to the .htaccess file and now it is working correctly.

RewriteEngine On 
RewriteBase / RewriteRule ^$ index.php [QSA,L] 
RewriteRule ^(.*)$ index.php [L,QSA] 

instead of %{REQUEST_FILENAME) it was suggested to prefix it with %{DOCUMENT_ROOT}
and it is working fine now. Can this be suggested to other users who have the same issue?

Thanks and Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.