[Solved] Lighttpd config error: create-mime.assign.pl parser failure
I've recently developed a strange Lighttpd config error (note: this config has been working for weeks without changes). The offending line of the lighttpd.conf is:
and the error message I get in my logs:
(configfile.c.957) source: /usr/share/lighttpd/create-mime.assign.pl line: 1 pos: 16 parser failed somehow near here: account
(configfile.c.957) source: /etc/lighttpd/lighttpd.conf.new line: 41 pos: 14 parser failed somehow near here: (EOL)
From a glance at the perl, it just builds the mimetype.assign config setting based on the contents of the
/etc/mime.types file. Executing the perl file manually provides the expected output and I can't see any special chars around "account" to explain why the parser suddenly fails. Lighttpd continues to run despite this config error (which surprised me a little), but it's screwing up the scripts I use to auto-generate site configs, because I check that
lighttpd -t -f lighttpd.conf passes before I add a new site, which it currently never does.
Has anyone ever seen this before, or does anyone have any ideas about how to debug this further.
OS: Raspbian Jessie on RPi2
$ ls -l /etc/mime.types
It is likely that the contents of that file changed. Look at the syntax on the line containing "account" in /etc/mime.types and consider commenting it out.
As an aside, lighttpd 1.4.35 is quite old. You should consider upgrading to Raspbian Stretch.
RE: [Solved] Lighttpd config error: create-mime.assign.pl parser failure - Added by gstrauss 6 months ago
A line containing 'account' with nothing else, e.g. no associated extension, is not valid in /etc/mime.types and will result in the warning you saw.