fcgiwrap working!
mike
mike503 at gmail.com
Sun Mar 1 10:59:20 MSK 2009
well remember, $_POST is PHP only afaik.
you have to access it other ways in Perl/CGI
On Sat, Feb 28, 2009 at 10:52 PM, Chris Cortese
<cortese.consulting at gmail.com> wrote:
> I have resolved my problem and can now see my hello, world script! The
> final fix for me was I had to put the "root" directive inside my location
> /cgi-bin/ {} block.
>
> I can't test my real script yet because I hit a new problem. For some
> reason, I am not getting my $_POST variables. I have to login to the site
> (and use $_POST) to hit my real cgi script. This was working fine yesterday
> so it's probably something simple.
>
>
> Grzegorz Nosek wrote:
>>
>> On sob, lut 28, 2009 at 01:52:21 -0800, Chris Cortese wrote:
>>
>>>
>>> Hello,
>>>
>>
>> Hi,
>>
>>
>>>
>>> I'm still trying to get fcgiwrap to handle a hello, world perl cgi
>>> script.
>>>
>>
>> Care to post it here? Maybe it's a simple missed/double newline or some
>> such?
>>
>>
>>>
>>> I run:
>>>
>>> spawn-fcgi -f /usr/local/bin/fcgiwrap -s /tmp/cgi.sock
>>>
>>> The first time I try to pull up my cgi-bin/test.pl file, I get:
>>>
>>> connect() to unix:/tmp/cgi.sock failed (13: Permission denied) while
>>> connecting to upstream
>>>
>>> Then I tried chmod o+w /tmp/cgi.sock
>>>
>>
>> Yes, the web server must have access to the socket.
>>
>>
>>>
>>> and then I get:
>>>
>>> upstream closed prematurely FastCGI stdout while reading response header
>>> from upstream
>>>
>>> ... I read most of the 42 results I got from querying the mailing list
>>> about this error.... to no avail.
>>>
>>
>> Please update fcgiwrap (I have just pushed a new snapshot with possibly
>> better error reporting), and retry. If you get a 403 response, check your
>> Nginx error log (fcgiwrap got the request but declined to run it for
>> some reason). If it's still a 502, either Nginx is misconfigured, or
>> something is badly broken in your CGI script (a CR on the hashbang line
>> is one tricky mofo ;))
>>
>> If it doesn't help, post the relevant parts of your config.
>>
>> Best regards,
>> Grzegorz Nosek
>>
>>
>
>
>
More information about the nginx
mailing list