Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to use Lighttpd and PHP to provide a lightweight standalone web server on Windows. I downloaded all the latest builds yesterday and after an hour everything was working fine.

Today, I changed server.document-root from server_root + "/htdocs" to server_root + "/../htdocs" and adjusted my directory structure accordingly. After restarting everything, I see "No input file specified" in the web browser when I try to access php pages.

Here are my configuration files. Of course, I've tried playing with cgi.fix_pathinfo and fastcgi.server but I can't seem to find the correct settings. Any ideas?



extension_dir = .\ext
extension = php_pdo_sqlite.dll 

date.timezone = UTC

log_errors = On
error_log = ..\logs\php_error.log


## modules to load
# at least mod_access and mod_accesslog should be loaded
server.modules = (
#   "mod_cgi",

#### include important configuration files
include "variables.conf"
include "mimetype.conf"

## a static document-root
## works fine
server.document-root        = server_root + "/htdocs"
## causes "No input file specified"
#server.document-root        = server_root + "/../htdocs"

# extensions that should not be handle via static-file transfer
static-file.exclude-extensions = ( ".php" )

## virtual directory listings
dir-listing.activate        = "disable"

#directory for file uploads
server.upload-dirs          = ( temp_dir )

# files to check for if .../ is requested
index-file.names            = ( "index.php", "index.html" )

## set the event-handler (read the performance section in the manual)
server.event-handler        = "libev"

## deny access the file-extensions
url.access-deny             = ( "~", ".inc", ".htaccess" )

## disable range request for PDF files
$HTTP["url"] =~ "\.pdf$" {
  server.range-requests = "disable"

#### status module
status.status-url           = "/server-status"
status.config-url           = "/server-config"

#### fastcgi module
fastcgi.server = ( ".php" => ("localhost" => ("host" => "", "port" => 521, "broken-scriptfilename" => "enable" )))
#cgi.assign = ( ".php" => "C:/development/tds/PHP/php-cgi.exe" )

this directory structure works


this is the directory structure I'm trying to achieve

share|improve this question
Have you check this part of the doc? – j0k Aug 31 '12 at 19:39
Yes. That's why I was playing with cgi.fix_pathinfo and fastcgi.server. Thanks for the tip though. – Larry Aug 31 '12 at 19:52
Have you tried to put the absolute path to htdocs instead of the relative one (with /../ inside)? – j0k Aug 31 '12 at 21:34
Thanks for the advice but I don't want to use absolute paths. I'm using a workaround for now. – Larry Sep 2 '12 at 17:05

I'm using a workaround for now.

mklink /J htdocs ..\htdocs

If anyone has a better solution I'd be happy to hear it.

share|improve this answer

check your doc_root is set right in php.ini

doc_root = C:\base_dir\htdocs

thats all mine needed

if you don't want an absolute path, you can unset it and it should also work.

; doc_root = ""

just tried it on mine with no issues

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.