Justin Hawkins wrote:
> Hi everyone,
> 
> After having got fed up with Apache (again) I decided to give  
> lighttpd and FastCGI a go.
> 
> I used the example at http://www.masonhq.com/?FastCGI and eventually  
> got it to work.
> 
> I had to make one change, which caused me some serious hair pulling  
> before I worked it out. I doubt my solution is any any way 'good' and  
> I welcome comments on doing it better.
> 
> The symptom was the call  $h->handle_cgi_object($cgi) failing with:
> 
>          Component path given to Interp->load must be absolute (was  
> given )
> 
> It seems that FastCGI under lighttpd does NOT set the environment  
> variables PATH_INFO and QUERY_STRING. So I did this:
> 
>    my $uri = $ENV{REQUEST_URI};
>    if ($uri =~ /\?/) {
>      $uri =~ /^(.*?)\?(.*)/;
>      $ENV{PATH_INFO} = $1;
>      $ENV{QUERY_STRING} = $2;
>    } else {
>      $ENV{PATH_INFO} = $uri;
>      $ENV{QUERY_STRING} = "";
>    }
> 
> (at the beginning of the "while ($cgi = new CGI::Fast)" loop).
> 
> This seems to make it work, at least for my quick 5 minute test (a  
> component loads and can be passed parameters).
> 
> Possibly this will save someone else some heartache.
> 
> I like the idea of getting this to work neatly - separating each  
> mason app into it's own little process(es) communicating via FastCGI  
> would be a big improvement over Apache and mod_perl for me.
> 
>       - Justin
> 
If you can, could you please make an annotation on the Lighty wiki 
(http://trac.lighttpd.net/trac/wiki/) about setting up Mason?

I would be most appreciative. I am using Apache as well but 
investigating lighttpd and at some point I will be trying out Mason with 
lighttpd/fast-cgi.

Thanks if you can!

:Robert


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to