I need to set up a simple web server with PHP on Windows XP that a number of different people will use for local testing.

I'm using LightTPD 1.4.30-4-IPv6-Win32-SSL and PHP 5.2.

So far I've created this folder structure:


I set up PHP as CGI and the document root as server_root + "/htdocs". It works fine (well, it's slow but I don't want to bother with FastCGI for now :) ).

My problem is when I try to put the htdocs outside of LightTPD folder, like this:


I update the document root to server_root + "/../../htdocs" and while static HTML pages work fine, PHP pages stop working (they return a "No input file specified"). I literally just change the document root, I didn't change anything in the php.ini or anywhere else. Please also note that I left all doc_root, user_dir and cgi.force_redirect to the default values in php.ini, and it works when htdocs is inside LightTPD, but not when I move it ouside.

Any idea of why it's breaking??

Here's my lightTPD.conf:

server.modules              = (

include "variables.conf"
include "mimetype.conf"

server.document-root        = server_root + "/htdocs"
#server.document-root        = server_root + "/../../htdocs"

server.upload-dirs          = ( temp_dir )

index-file.names            = ( "index.php", "index.pl", "index.cgi", "index.cml",
                            "index.html", "index.htm", "default.htm" )

server.event-handler        = "libev"

url.access-deny             = ( "~", ".inc" )

$HTTP["url"] =~ "\.pdf$" {
    server.range-requests = "disable"

static-file.exclude-extensions = ( ".php", ".pl", ".cgi" )
server.errorlog = server_root + "/logs/error.log"

######### Options that are good to be but not neccesary to be changed #######

dir-listing.activate        = "enable"

#### CGI module
cgi.assign                 = ( ".php" => server_root + "/../PHP/php-cgi.exe" )

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

1 Answer 1


I can't give you the why, but lighty doesn't appear to like the parent .. notation. I just tested this and if you specify the full path(don't bother using server_root in your config, it will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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