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

About these ads

3 comments

  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 127.0.0.1:521
    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” => “127.0.0.1″,”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 :)

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s