Greg Denton | 2 Jan 2009 20:14
Picon
Gravatar

Re: fcgi_i/ostream - deprecated?

Ooops....apologies, looks like this problem has something to do with
my libcurl-based load test app and not the fcgi_streambuf peek().
Thanks for the tips, though, I did switch to mod_fastcgi.

On Tue, Dec 30, 2008 at 2:14 PM, Eddie <eddie@...> wrote:
> On Tue, 2008-12-30 at 13:59 -0800, Greg Denton wrote:
>> Anyone have a guess at whether it's mod_fcgid or fcgi_streambuf (or
>> the combination), before I start diving into code? Thanks.
>
> I would guess it is fcgi_streambuf. I have run none-fcgi_streambuf code
> through some pretty rigorous tests without any issues. I would still
> recommend testing it out with mod_fastcgi anyway though. I have noticed
> while analyzing fcgid vs. fastcgi a few minor differences in the way
> data is communicated. Those differences however seem to be more due to
> vague parts of the FastCGI specification.
> --
>        Eddie
>
>
>
Danny Kimsey | 12 Jan 2009 23:45
Picon
Gravatar

Missing env variable using cgi-fcgi standalone

I am testing the my application using cgi-fcgi as a standalone, and
although the application runs some enviromental variables are missing
in the context of the application.
Specifically, REMOTE_USER, which comes from Apache's Auth*
configuration.  Any ideas what might be causing this? (The application
itself is perl)

--
Danny.

The mind of the believer stagnates. It fails to grow outward into an
unlimited, infinite universe.
 -Frank Herbert
Danny Kimsey | 17 Jan 2009 18:59
Picon
Gravatar

Re: Missing env variable using cgi-fcgi standalone

We wrapped it in a bash script to test it, I'll check but I'm
uncertain as of yet what the problem is.

On Mon, Jan 12, 2009 at 7:28 PM, Simon <simon@...> wrote:
>
> Is your script behind a wrapper? If so, make sure the wrapper isn't
> filtering the
> ENV out. Apache's default suexec does this, although REMOTE_USER
> should not be filtered by default.
>
> Also check your log to make sure when you are accessing the script the
> user is logged, otherwise your authentication is misconfigured.
>
> -Simon
>
> On Mon, 12 Jan 2009 17:45:50 -0500, Danny Kimsey wrote:
>
>>I am testing the my application using cgi-fcgi as a standalone, and
>>although the application runs some enviromental variables are missing
>>in the context of the application.
>>Specifically, REMOTE_USER, which comes from Apache's Auth*
>>configuration. Any ideas what might be causing this? (The application
>>itself is perl)
>>
>>
>>--
>>Danny.
>>
>>The mind of the believer stagnates. It fails to grow outward into an
>>unlimited, infinite universe.
(Continue reading)

asdasd asdasd | 18 Jan 2009 08:49
Picon

apache+php+fastcgi+suexec

Hi. I'm new user of fastcgi but it seems i noticed a bug in it.


FastCgiIpcDir /usr/aa
AddHandler fastcgi-script .fcgi
FastCgiSuexec /usr/h2/bin/suexec
FastCgiConfig -killInterval 30 -pass-header HTTP_AUTHORIZATION -startDelay 3

<Location /php-fastcgi/>
Options ExecCGI
SetHandler fastcgi-script
</Location>

<VirtualHost *>
ServerAlias adres.strony.pl
DocumentRoot /home/user/public_html/
SuexecUserGroup user user

ScriptAlias /php-fastcgi/ /usr/suexec/
AddType application/x-httpd-fastphp .php
Action application/x-httpd-fastphp /php-fastcgi/fcgi

</VirtualHost>


Everything works fine with this configuration but there is a huge problem. If I run script that will execute for 23s new fcgi childs will spawn every 3 seconds (as set in startDelay), even thou those new childs will be free. Spawning will continue until maxClassProcessess is reached. Its like fastcgi check only if first handler is available and will continue spawning new halders every if they will be not busy. This is very bad because this equals to staticly settings number of handlers. Simultaniously I can run scripts that will execute in 1 seconds, because there are many free handlers, but if scripts continue for more than 3 seconds new handlers are always spawned until maxClassProcessess is reached.
_______________________________________________
FastCGI-developers mailing list
FastCGI-developers@...
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
Rasmus Andersson | 24 Jan 2009 18:36
Gravatar

Patch for "Symbol not found: _environ" on Mac OS X

Hello all,

First off: I'm new on this list but have been developing with libfcgi
for about four years now.

Recently a bug was discovered when Python 2.5.4 was updated in
MacPorts – libfcgi relies on extern char **environ on Mac OS X, which
does not exist. I know, it's really sick Apple does not export it
POSIX-style. However, the ugly bug fully correct fix is to #define
environ (*_NSGetEnviron()).

--

-- 
Rasmus Andersson
Attachment (patch-cgi-fcgi-cgi-fcgi.c.diff): application/octet-stream, 356 bytes
Attachment (patch-libfcgi-fcgi_stdio.c.diff): application/octet-stream, 372 bytes
_______________________________________________
FastCGI-developers mailing list
FastCGI-developers@...
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
Lyle | 29 Jan 2009 04:57

Re: FastCGI: comm with server "... /test.pl" aborted: GetOverlappedResult() failed

dj__manu@... wrote:
> Hi all,
>  
> Can't make apache2.2.11+FCGI+windows (vista) work and google didn't 
> help Triste émoticône
>  
> Using the simple synopsis code of FCGI (which works fine as a 
> standalone script):

I've only tested FCGI on Windows/IIS, but have you tried getting 
FCGI::IIS to run? I has a test mode which should work on Apache as well.

Also it might be worth trying CGI::Fast

Lyle
Artur Zaprzała | 29 Jan 2009 10:15

Re: (4)Interrupted system call:

Try upgrading to the latest snapshot of 2.4.7 at 
http://www.fastcgi.com/dist/mod_fastcgi-SNAP-0811090952.tar.gz. I have 
had these problems too. They are fixed now.

Artur

root@... wrote:
> Hello
>  
> I have a problem with fastcgi with Interrupted system calls in my 
> error log.
> My config:
>  
> *Debian Etch 64bit*
> *4GB Ram*
> *Apache/2.2.0 (Debian) mod_fastcgi/2.4.2*
> *PHP Version 5.2.0-8+etch13*
> *Zend Engine v2.2.0*
>  
> fastcgi conf:
>  
> *export PHPRC
> PHP_FCGI_CHILDREN=2
> export PHP_FCGI_CHILDREN
> PHP_FCGI_MAX_REQUESTS=1000
> export PHP_FCGI_MAX_REQUESTS*
> ** 
> I have this errors on my server in the error logs:
> ** 
> [Thu Jan 29 08:56:18 2009] [error] [client 91.112.236.*] 
> (4)Interrupted system call: FastCGI: comm with server 
> "/var/www/fcgi/master/php5-fcgi-starter" aborted: select() failed, 
> referer: http://admin.menkisys.de/reseller/orders.php
> [Thu Jan 29 08:56:18 2009] [error] [client 91.112.236.*] FastCGI: 
> incomplete headers (0 bytes) received from server 
> "/var/www/fcgi/master/php5-fcgi-starter", referer: 
> http://admin.menkisys.de/reseller/orders.php
> I have a ispCP webhosting spoftware installed and i have about 1100 
> domains on this server. This error comes often when i want do access 
> the reseller page. The reseller page shows about 800 domains on one 
> webpage. The problem persist since 3-4 weeks!
> In former time i have 500 domains and this problem does not exist.
>  
> What i can do to solve the problem. I want to host about 2000 Domains 
> on this Server. Maybe i must increase some settings on my fastcgi 
> configuration??? Or update fastcgi o solve the problem??
>  
> Thanky you for your help. Fastcgi is a very good application.
>  
> MENKI
dj__manu | 29 Jan 2009 12:58
Picon
Favicon

Re: FastCGI: comm with server "... /test.pl" aborted: GetOverlappedResult() failed

> dj__manu@... wrote:
>> Hi all,
>>  Can't make apache2.2.11+FCGI+windows (vista) work and google didn't help 
>> Triste émoticône
>>  Using the simple synopsis code of FCGI (which works fine as a standalone 
>> script):
>
> I've only tested FCGI on Windows/IIS, but have you tried getting FCGI::IIS 
> to run? I has a test mode which should work on Apache as well.

Thanks for the answer but :

I run Vista Home Basic edition where IIS is not really supported by MS :-(
The goal is just to have a simple dev platform.
On production it will run on linux and hopefully work!

>
> Also it might be worth trying CGI::Fast

Same error

So to sum up :
- mod_fastcgi w apache2.2 not working on windows (everyone complains about 
same errors like me and I didnt see
any good solution given by anyone to fix it)
- IIS + fastcgi not possible on vista basic edition

Any advice : lighttpd or thttpd ?

Manu

 
Lyle | 29 Jan 2009 13:23

Re: FastCGI: comm with server "... /test.pl" aborted: GetOverlappedResult() failed

dj__manu@... wrote:
>> dj__manu@... wrote:
>>> Hi all,
>>>  Can't make apache2.2.11+FCGI+windows (vista) work and google didn't 
>>> help Triste émoticône
>>>  Using the simple synopsis code of FCGI (which works fine as a 
>>> standalone script):
>>
>> I've only tested FCGI on Windows/IIS, but have you tried getting 
>> FCGI::IIS to run? I has a test mode which should work on Apache as well.
>
> Thanks for the answer but :
>
> I run Vista Home Basic edition where IIS is not really supported by MS 
> :-(
> The goal is just to have a simple dev platform.
> On production it will run on linux and hopefully work!
>
>>
>> Also it might be worth trying CGI::Fast
>
> Same error
>
> So to sum up :
> - mod_fastcgi w apache2.2 not working on windows (everyone complains 
> about same errors like me and I didnt see
> any good solution given by anyone to fix it)
> - IIS + fastcgi not possible on vista basic edition
>
> Any advice : lighttpd or thttpd ?

Manu,
  Unfortunately at this point I haven't had change to work through all 
the fcgi setups, and write guides like I've been planning.
 I'm held back on a very large project and having to pay bills :(

  Hopefully I've have chance in the next couple of months, but I can 
understand that's far off for you :(

I'd give lighttpd a go. Let us know if you manage to get a solution. If 
the worst come to the worst you could always dual boot Linux, or try cygwin.

Lyle
Volkan YAZICI | 30 Jan 2009 13:27

Length Incosistency Between FCGI_RECORD and FCGI_PARAMS

Hi,

AFAIU, FCGI_PARAMS are wrapped in FCGI_RECORD data types. (Please
correct me if I am wrong.) And there are four types of FCGI_PARAMS
message formats with variable length headers:

  1. {KEY-LEN[1], VAL-LEN[1], KEY[KEY-LEN], VAL[VAL-LEN]}
  2. {KEY-LEN[1], VAL-LEN[4], KEY[KEY-LEN], VAL[VAL-LEN]}
  3. {KEY-LEN[4], VAL-LEN[1], KEY[KEY-LEN], VAL[VAL-LEN]}
  4. {KEY-LEN[4], VAL-LEN[4], KEY[KEY-LEN], VAL[VAL-LEN]}

But an FCGI_RECORD message header format is of fixed length. Now
consider below message:

  {VERSION    [1],
   TYPE[1],                  // FCGI_PARAMS Type
   REQUEST-ID [2],
   CONTENT-LEN[2],
   PADDING-LEN[1],
   RESERVED   [1],
   CONTENT    [CONTENT-LEN], // {KEY-LEN[4],
                             //  VAL-LEN[4],
                             //  KEY    [KEY-LEN],
                             //  VAL    [VAL-LEN]}
   PADDING    [PADDING-LEN]}

Whole record length is represented by 2 bytes (maximum 2^(2*8) bytes),
but a key+value length might be representing a block of 8 bytes (maximum
2^(4*8) bytes) in size.

  +-----------------------------+
  | ### FCGI_RECORD ########### |
  | +----------------------------------------------+
  | | ### FCGI_PARAMS ############################ |
  | +----------------------------------------------+
  +-----------------------------+

  ^                             ^                  ^
  |---- 2^(2*8)=65536 bytes ----|                  |
  |--------------- 2^(4*8)=4294967296 -------------|

How can this be possible? I have read FastCGI specification[1] over and
over again but couldn't find a clue. Would you mind helping me to
clarify this point please?

Regards.

[1] http://www.fastcgi.com/devkit/doc/fcgi-spec.html

Gmane