Ticket #487 (closed defect: fixed)

Opened 3 years ago

Last modified 6 months ago

Lighty 1.4.9 no likey relative bin-paths

Reported by: GUI Owned by: jan
Priority: normal Milestone:
Component: mod_fastcgi Version: 1.4.x
Severity: normal Keywords:
Cc: Blocked By:
Need User Feedback: no Blocking:

Description

I'm running FreeBSD and recently upgraded to lighttpd 1.4.9. When I did, most of my apps stopped working. I eventually discovered that the problem has to do with the relative bin-paths given for mod_fastcgi. Even in a fresh rails installation, trying to execute ./script/server will end in:

=> Booting lighttpd (use 'script/server webrick' to force WEBrick)
=> Rails application started on http://0.0.0.0:3000
=> Call with -d to detach (requires absolute paths in config/lighttpd.conf)
=> Ctrl-C to shutdown server (see config/lighttpd.conf for options)
2006-01-25 11:32:50: (mod_fastcgi.c.989) execve failed for: public/dispatch.fcgi No such file or directory
2006-01-25 11:32:50: (mod_fastcgi.c.1015) the fastcgi-backend public/dispatch.fcgi failed to start:
2006-01-25 11:32:50: (mod_fastcgi.c.1019) child exited with status 2 public/dispatch.fcgi
2006-01-25 11:32:50: (mod_fastcgi.c.1022) if you try do run PHP as FastCGI backend make sure you use the FastCGI enabled version.
You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT (cgi) NOR (cli)
For more information check http://www.lighttpd.net/documentation/fastcgi.html#preparing-php-as-a-fastcgi-program
2006-01-25 11:32:50: (mod_fastcgi.c.1027) If this is PHP on Gentoo add fastcgi to the USE flags
2006-01-25 11:32:50: (mod_fastcgi.c.1314) [ERROR]: spawning fcgi failed.
2006-01-25 11:32:50: (server.c.702) Configuration of plugins failed. Going down.

But if I change the reference to dispatch.fcgi to its full path, things start working. Or if I downgrade to 1.4.8, everything works as expected again. It just seems strange that this isn't all over the place, so I'm slightly inclined to believe it's something funky with my setup or in the freebsd port of lighttpd. But again, it works as expected when downgraded, and the symptoms exist on a virgin rails program.

Attachments

Change History

Changed 3 years ago by jan

  • status changed from new to closed
  • resolution set to fixed

in lighttpd 1.4.10 you will have CWD in your configfiles:

"bin-path" => CWD + "/public/dispatch.fcgi"

which will point to the current working dir. We had to change the bin-path base dir to / for security reasons.

Fixed in changeset [965]

Changed 6 months ago by Ryan T Mulligan

  • pending unset

You can get this cryptic error message when the lighttpd user cannot access the fcgi socket directory or the directory of the .fcgi file.

Add/Change #487 (Lighty 1.4.9 no likey relative bin-paths)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.