4

I'm running lighttpd/1.4.28 (ssl) on Ubuntu 12.04 LTS. Everything's working, and I'm trying to do some performance tuning. I'd like to enable debug mode for the fastcgi module, however when I add the directive fastcgi.debug to my conf file, lighttpd chokes with a "parser failed" error:

2013-10-08 10:56:23: (configfile.c.912) 
source: /etc/lighttpd/conf-enabled/15-fastcgi-php.conf 
line: 1 
pos: 15 parser failed somehow near here: (EOL)

The config file is: /etc/lighttpd/conf-enabled/15-fastcgi-php.conf

fastcgi.debug=1

fastcgi.server += ( ".php" =>
    ((
            "bin-path" => "/usr/bin/php-cgi",
            "socket" => "/tmp/php.socket",
            "max-procs" => 1,  # runs max-procs bin-path controllers plus (max-procs * PHP_FCGI_CHILDREN) workers
            "idle-timeout" => 20,
            "bin-environment" => (
                    "PHP_FCGI_CHILDREN" => "10",
                    # PHP_FCGI_MAX_REQUESTS: The number of requests that a single worker handles before it kills itself.
                    "PHP_FCGI_MAX_REQUESTS" => "10000"
            ),
            "bin-copy-environment" => (
                    "PATH", "SHELL", "USER"
            ),
            "broken-scriptfilename" => "enable",
            "check-local" => "disable"
    ))
)

Why isn't the directive recognized? I get the error even if I set it to zero.

Alan
  • 541
  • 1
  • 6
  • 20
  • Try making it `fastcgi.debug = 1` and you didn't edit it on windows did you? – user9517 Oct 08 '13 at 18:09
  • Thanks, I had tried that, also thinking it's a whitespace issue, and it gives the same error. I only edited the file using vi on the server. – Alan Oct 08 '13 at 18:14

1 Answers1

4

I've spent the last hour on this, and finally ran across this thread: http://redmine.lighttpd.net/boards/2/topics/2265

At the very end of the thread, the OP mentions running lighttpd interactively from the console:

sudo lighttpd -Df /etc/lighttpd/lighttpd.conf

When I did that, it printed out the message:

Duplicate config variable in conditional 0 global: fastcgi.debug

So I grep'd all of my configs, and sure enough, there was another file with the fastcgi.debug directive. When I removed the dup entry, lighttpd started.

lighttpd should write that message to the error log!

Alan
  • 541
  • 1
  • 6
  • 20