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