Error: No input file specified

Today I was trying to configure Lighty webserver with PHP CGI.

After configuring I did “phpinfo()”. But it gave me this error:

No input file specified

After googling around for some time. I found the solution:

Open lighttpd.conf  search for server.document-root. The value may be “/var/www” on Linux or “c:\lighttpd\htdocs” on Windows.

Now edit php.ini search for doc_root and set doc_root value equal to the value of server.document_root of lighttpd.conf.

Suppose you are on Linux then value should be:

doc_root = "/var/www"

And on Windows system doc_root should be c:\lighttpd\htdocs


5 thoughts on “Error: No input file specified

  1. Assuming that the standalone LightTPD for Windows was obtained from the WLMP project page.

    fot Lighttpd
    server.document-root = “C:/Program Files/LightTPD/htdocs/”

    for PHP.ini
    doc_root = C:/Program Files/LightTPD/htdocs/

    For reference, my short_open_tag variable was set to “On”
    My bat file to start the PHP engine reads: c:\php\php-cgi.exe -b
    On lighttpd-inc.conf my “mod_fastcgi” line is uncommented and my “fastcgi.server” is also uncommented and that same line reads:
    fastcgi.server = ( “.php” =>( “localhost” =>(“host” => “”,”port” => 521 )))

    Smooth sailing

  2. Hi, Kunal

    You relived me of a big headache….I tried everything they told on the lighty redwine but it was your solution that worked!

    Thanks a lot!
    BTW, I am from Thane 🙂

  3. Hi, Kunal
    I am happy to see this projects because I wnat to build own web server on Android for my educational research.
    I want ask some queastions :
    1. Can you provide some tutorials or references about building PHP/Lighttpd/MySQL ?
    2. I saw an Android APP that it did not need to root and it also build a web server app.
    Here is the android app link.
    I want to know this app is different from yours. Thanks.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s