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
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
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
Hi Rohan,
Glad to hear that the issue is solved