From arturz at ownmail.net Tue Nov 4 09:10:54 2008 From: arturz at ownmail.net (Artur Zaprzala) Date: Tue, 04 Nov 2008 15:10:54 +0100 Subject: [FASTCGI] More EINTR fixes Message-ID: <491057EE.2010709@ownmail.net> mod_fastcgi doesn't handle all EINTR errors, which can happen when Apache is running in a multi-threaded mode and is keeping up with MaxSpareThreads or is doing a graceful restart. Below is a patch against mod_fastcgi-SNAP-0809231057. I fixed this about 3 years ago, so it is well tested now. -------------- next part -------------- A non-text attachment was scrubbed... Name: mod_fastcgi-eintr.patch Type: text/x-patch Size: 1265 bytes Desc: not available URL: From arturz at ownmail.net Tue Nov 4 10:16:53 2008 From: arturz at ownmail.net (=?ISO-8859-2?Q?Artur_Zaprza=B3a?=) Date: Tue, 04 Nov 2008 16:16:53 +0100 Subject: [FASTCGI] Content-Length header should be set using ap_set_content_length Message-ID: <49106765.9030901@ownmail.net> Content-Length header should be set using ap_set_content_length() function in process_headers(). I fixed this about 3 years ago and I don't remember what was the problem with the current aproach, but it surely was. Today I did some research to support my fix. Currently process_headers() adds Content-Length to err_headers_out. Here is description of err_headers_out from Apache documentation: > The difference between headers_out and err_headers_out is that the latter are printed even on error, and persist across internal redirects (so the headers printed for ErrorDocument handlers will have them). And Content-Length shouldn't persist across internal redirects. -------------- next part -------------- A non-text attachment was scrubbed... Name: mod_fastcgi-clength.patch Type: text/x-patch Size: 539 bytes Desc: not available URL: From davidb at pins.net Wed Nov 5 09:41:30 2008 From: davidb at pins.net (David Birnbaum) Date: Wed, 5 Nov 2008 09:41:30 -0500 (EST) Subject: [FASTCGI] Content-Length header should be set using ap_set_content_length In-Reply-To: <49106765.9030901@ownmail.net> References: <49106765.9030901@ownmail.net> Message-ID: Artur, Thanks for the patches - we'll take a peek and see about rolling them into the current SNAP before cutting a new version. David. ----- On Tue, 4 Nov 2008, Artur Zaprza?a wrote: > Content-Length header should be set using ap_set_content_length() function in > process_headers(). I fixed this about 3 years ago and I don't remember what > was the problem with the current aproach, but it surely was. > > Today I did some research to support my fix. > > Currently process_headers() adds Content-Length to err_headers_out. Here is > description of err_headers_out from Apache documentation: >> The difference between headers_out and err_headers_out is that the latter >> are printed even on error, and persist across internal redirects (so the >> headers printed for ErrorDocument handlers will have them). > > And Content-Length shouldn't persist across internal redirects. > From jsprenkle at gmail.com Wed Nov 5 16:17:51 2008 From: jsprenkle at gmail.com (Jay Sprenkle) Date: Wed, 5 Nov 2008 15:17:51 -0600 Subject: [FASTCGI] Content-Length header should be set using ap_set_content_length In-Reply-To: References: <49106765.9030901@ownmail.net> Message-ID: <1b5f39a10811051317u366b3bc8k846359bbea54ae11@mail.gmail.com> When will a new version be released? I was wondering if I should wait for it or go with the old code. Thanks 2008/11/5 David Birnbaum > Artur, > > Thanks for the patches - we'll take a peek and see about rolling them into > the current SNAP before cutting a new version. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From Markus.Kummer at t-systems.com Fri Nov 7 05:42:32 2008 From: Markus.Kummer at t-systems.com (Markus.Kummer at t-systems.com) Date: Fri, 7 Nov 2008 11:42:32 +0100 Subject: [FASTCGI] mod_fastcgi apache 2.2.9 fcgi-pm Message-ID: <63B1A4D5F62C7B458A5B757A5EA8175004DC5004@S4DE8PSAANH.t-systems.com> Dear List Members, I can't get mod_fastcgi to work. The situation is as follows: - OS: Suse Linux Enterprise Server 9 x86_64 - apache 2.2.9 - mod_fastcgi-2.4.6 (and others: mod_fastcgi-2.4.0 with patch for apache 2.2.; mod_fastcgi-SNAP-0809231057.tar.gz) 1. I build the module as described in INSTALL.AP2 # cd # cp Makefile.AP2 Makefile # make top_dir= The module builds without errors. Only one warning appears: fcgi_config.c: In function 'fcgi_config_new_auth_server': fcgi_config.c:1207: warning: cast from pointer to integer of different size 2. I did the apache configuration ... LoadModule fastcgi_module modules/mod_fastcgi.so ... httpd.conf looks like: AllowOverride None Options None Order allow,deny Deny from all ScriptAlias /fcgi-bin/ /www/fcgi-bin/ FastCgiIpcDir /var/log/apache/fastcgi AllowOverride None Options +ExecCGI -Includes SetHandler fastcgi-script Order allow,deny Allow from all AddHandler fastcgi-script .fcg .fcgi .fpl 3. Start apache In the apache error log I find this: [notice] FastCGI: process manager initialized (pid 1376) When I look at the process it appears like this: # ps aux |grep fcgi wwwrun 1376 0.0 0.0 116392 4624 ? S 10:51 0:00 /appl/local/apache/2.2.9/bin/fcgi- -k start My fastcgi application doesn't start with a permission denied error. So here comes my question: Is it possible that the module is broken or did I miss something in my setup. I wonder where the pm of the fcgi-pm proccess has gone in the ps listing. I use mod_fastcgi on two other servers without problem. The only differences I see is that the process manager starts whithout the pm. If I am totally wrong here please direct me to the right place if possible. If you need more detailed information please let me know. Thanks in advance! Best regards, Markus ================================== T-Systems Enterprise Services GmbH Systems Integration / ADSF / SF / Telco / Network Planning Systems Rabinstrasse 8 D- 53111 Bonn Tel: +49 228 9841 382 E-Mail: markus.kummer at t-systems.com T-Systems Enterprise Services GmbH Aufsichtsrat: René Obermann (Vorsitzender) Executive Committee: Reinhard Clemens (Vorsitzender)*, Olaf Heyden*, Dr. Klaus Hofmann, Katrin Horstmann, Joachim Langmack*, Dr. Stefan Schloter, Dr. Matthias Schuster*, Zvezdana Seeger*, Klaus Werner*, Dr. Rolf Werner Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE87523644 *Geschäftsführer gem. § 35 GmbHG Notice: This transmittal and/or attachments may be privileged or confidential. If you are not the intended recipient, you are hereby notified that you have received this transmittal in error; any review, dissemination, or copying is strictly prohibited. If you received this transmittal in error, please notify us immediately by reply and immediately delete this message and all its attachments. Thank you. T-Systems - Business flexibility From davidb at pins.net Fri Nov 7 10:41:26 2008 From: davidb at pins.net (David Birnbaum) Date: Fri, 7 Nov 2008 10:41:26 -0500 (EST) Subject: [FASTCGI] mod_fastcgi apache 2.2.9 fcgi-pm In-Reply-To: <63B1A4D5F62C7B458A5B757A5EA8175004DC5004@S4DE8PSAANH.t-systems.com> References: <63B1A4D5F62C7B458A5B757A5EA8175004DC5004@S4DE8PSAANH.t-systems.com> Message-ID: Markus, Well, if it's permission denied, then have you walked through all the permissions explicitly to make sure the user running fcgi (wwwrun?) can get all the way to the binary and exec it? Perhaps a truss/strace on the process manager will be enlightening. David. ----- On Fri, 7 Nov 2008, Markus.Kummer at t-systems.com wrote: > Dear List Members, > > I can't get mod_fastcgi to work. > The situation is as follows: > > - OS: Suse Linux Enterprise Server 9 x86_64 > - apache 2.2.9 > - mod_fastcgi-2.4.6 (and others: mod_fastcgi-2.4.0 with patch for apache 2.2.; mod_fastcgi-SNAP-0809231057.tar.gz) > > 1. I build the module as described in INSTALL.AP2 > > # cd > # cp Makefile.AP2 Makefile > # make top_dir= > > The module builds without errors. Only one warning appears: > > fcgi_config.c: In function 'fcgi_config_new_auth_server': > fcgi_config.c:1207: warning: cast from pointer to integer of different size > > 2. I did the apache configuration > > ... > LoadModule fastcgi_module modules/mod_fastcgi.so > ... > httpd.conf looks like: > > > > AllowOverride None > Options None > Order allow,deny > Deny from all > > > > > > ScriptAlias /fcgi-bin/ /www/fcgi-bin/ > FastCgiIpcDir /var/log/apache/fastcgi > > AllowOverride None > Options +ExecCGI -Includes > SetHandler fastcgi-script > Order allow,deny > Allow from all > > AddHandler fastcgi-script .fcg .fcgi .fpl > > > 3. Start apache > > In the apache error log I find this: > > [notice] FastCGI: process manager initialized (pid 1376) > > When I look at the process it appears like this: > > # ps aux |grep fcgi > wwwrun 1376 0.0 0.0 116392 4624 ? S 10:51 0:00 /appl/local/apache/2.2.9/bin/fcgi- -k start > > My fastcgi application doesn't start with a permission denied error. > > So here comes my question: > > Is it possible that the module is broken or did I miss something in my setup. > > I wonder where the pm of the fcgi-pm proccess has gone in the ps listing. > > I use mod_fastcgi on two other servers without problem. The only differences I see is that the process manager starts whithout the pm. > > If I am totally wrong here please direct me to the right place if possible. > If you need more detailed information please let me know. > > Thanks in advance! > > Best regards, > > Markus > ================================== > T-Systems Enterprise Services GmbH > Systems Integration / ADSF / SF / Telco / Network Planning Systems > Rabinstrasse 8 > D- 53111 Bonn > Tel: +49 228 9841 382 > E-Mail: markus.kummer at t-systems.com > > T-Systems Enterprise Services GmbH > Aufsichtsrat: René Obermann (Vorsitzender) Executive Committee: Reinhard Clemens (Vorsitzender)*, Olaf Heyden*, Dr. Klaus Hofmann, Katrin Horstmann, Joachim Langmack*, Dr. Stefan Schloter, Dr. Matthias Schuster*, Zvezdana Seeger*, Klaus Werner*, Dr. Rolf Werner > Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE87523644 *Geschäftsführer gem. § 35 GmbHG > > Notice: This transmittal and/or attachments may be privileged or confidential. If you are not the intended recipient, you are hereby notified that you have received this transmittal in error; any review, dissemination, or copying is strictly prohibited. If you received this transmittal in error, please notify us immediately by reply and immediately delete this message and all its attachments. Thank you. > > T-Systems - Business flexibility > _______________________________________________ > FastCGI-developers mailing list > FastCGI-developers at mailman.fastcgi.com > http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers > From pawinan at ilstu.edu Fri Nov 7 10:52:14 2008 From: pawinan at ilstu.edu (Phil Winans) Date: Fri, 07 Nov 2008 09:52:14 -0600 Subject: [FASTCGI] Unsubscribe is not working In-Reply-To: <48F8A7BB.2040001@arcamax.com> References: <48F8A7BB.2040001@arcamax.com> Message-ID: <4914642E.6030104@ilstu.edu> Bryan White wrote: > I am moving my mailing list email to another account. Toward that end I > have been trying to unsub the FastCGI list from this account. It is not > working. I have tried three times over the last month or so. The list > volume is low enough that it often takes a week before I see new > messages and learn that the unsub did not take. > > Twice I have used the HTTP link in the unsub confirmation email. The > last time I replied to the confirmation email. That was on Oct 7th. > > Is there someone in a position to investigate what is going on? > I'm having the same problem. I've tried to unsubscribe several times to no effect. -- Phil Winans | pawinan at ilstu.edu Ph. 309-438-5597 | Cell 309-828-1760 | Pager 309-438-0450 Network Engineer | Telecommunications & Networking Illinois State University From gabipetrovay at gmail.com Sun Nov 9 06:22:54 2008 From: gabipetrovay at gmail.com (Gabriel Petrovay) Date: Sun, 9 Nov 2008 12:22:54 +0100 Subject: [FASTCGI] FastCGI and mod_rewrite don't go well together...?!? Bug or Feature or UI (as in "user incompetence")? Message-ID: Hi all, I use FastCGI together with mod_rewrite for a site. Here is my .htaccess file content for the DocumentRoot directory: AddHandler fastcgi-script .exe Options +FollowSymLinks +ExecCGI RewriteEngine On # rewrite empty URIs to /default/index RewriteRule ^$|^/$ /default/index [QSA] # if the requested path does not match a file, rewrite the URI and execute the fcgi script RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /fcgi-bin/sausa_fcgi.exe [QSA,L] --------------------- What I am trying to achieve is: I want to have the default page http://localhost/default/index when the user asks only for http://localhostor http://localhost/. The FastCGI script handles the request http://loclhost/default/indexcorectly. Meaning that I get my expected result. (FastCGI picks the /default/index resource from another location). When I log the internal requests for http://localhost/ I get the following list: / /default/index /fcgi-bin/sausa_fcgi.exe but inside the FCGI handler, the REQUEST_URI in request->envp tells me only "/". Does that mean that FastCGI cannot handle internal requests generated by RewriteRule (mod_rewrite) and can only give me only the initial request uri? I use the following FCGI library function calls: FCGX_Accept_r(&request) FCGX_GetParam("REQUEST_URI", request.envp) I was expecting that FCGX_GetParam returns "/default/index" and not "/" Thanks! Regards, -- MSc Gabriel Petrovay MCSA, MCDBA, MCAD Mobile: +41(0)787978034 -------------- next part -------------- An HTML attachment was scrubbed... URL: From robs at fastcgi.com Sun Nov 9 09:07:55 2008 From: robs at fastcgi.com (Rob Saccoccio) Date: Sun, 9 Nov 2008 09:07:55 -0500 Subject: [FASTCGI] Content-Length header should be set usingap_set_content_length In-Reply-To: <49106765.9030901@ownmail.net> References: <49106765.9030901@ownmail.net> Message-ID: Committed. Thanks. Rob > -----Original Message----- > From: fastcgi-developers-bounces+robs=fastcgi.com at mailman.fastcgi.com > [mailto:fastcgi-developers-bounces+robs=fastcgi.com at mailman.fastcgi.com] > On Behalf Of Artur Zaprzala > Sent: Tuesday, November 04, 2008 10:17 AM > To: fastcgi-developers at mailman.fastcgi.com > Subject: [FASTCGI] Content-Length header should be set > usingap_set_content_length > > Content-Length header should be set using ap_set_content_length() function > in > process_headers(). I fixed this about 3 years ago and I don't remember > what was > the problem with the current aproach, but it surely was. > > Today I did some research to support my fix. > > Currently process_headers() adds Content-Length to err_headers_out. Here > is > description of err_headers_out from Apache documentation: > > The difference between headers_out and err_headers_out is that the > latter are printed even on error, and persist across internal redirects > (so the headers printed for ErrorDocument handlers will have them). > > And Content-Length shouldn't persist across internal redirects. From robs at fastcgi.com Sun Nov 9 09:31:22 2008 From: robs at fastcgi.com (Rob Saccoccio) Date: Sun, 9 Nov 2008 09:31:22 -0500 Subject: [FASTCGI] More EINTR fixes In-Reply-To: <491057EE.2010709@ownmail.net> References: <491057EE.2010709@ownmail.net> Message-ID: <926BA1D2762043F78C1C15717420D3DA@maisel> Thanks. Committed. Rob > -----Original Message----- > From: fastcgi-developers-bounces+robs=fastcgi.com at mailman.fastcgi.com > [mailto:fastcgi-developers-bounces+robs=fastcgi.com at mailman.fastcgi.com] > On Behalf Of Artur Zaprzala > Sent: Tuesday, November 04, 2008 9:11 AM > To: fastcgi-developers at mailman.fastcgi.com > Subject: [FASTCGI] More EINTR fixes > > mod_fastcgi doesn't handle all EINTR errors, which can happen when > Apache is running in a multi-threaded mode and is keeping up with > MaxSpareThreads or is doing a graceful restart. > > Below is a patch against mod_fastcgi-SNAP-0809231057. I fixed this about > 3 years ago, so it is well tested now. > From robs at fastcgi.com Sun Nov 9 09:42:05 2008 From: robs at fastcgi.com (Rob Saccoccio) Date: Sun, 9 Nov 2008 09:42:05 -0500 Subject: [FASTCGI] FastCGI and mod_rewrite don't go well together...?!? Bugor Feature or UI (as in "user incompetence")? In-Reply-To: References: Message-ID: This should work fine, but I wouldn't expect the rewritten uri to be in REQUEST_URI. I think what you're looking for is in REQUEST_FILENAME. Have a closer look at the mod_rewrite docs. mod_fastcgi should, in general, do the same thing that mod_cgi does. IOW, if you ever question whether mod_fastcgi is doing the right thing, try it with mod_cgi. Rob _____ From: fastcgi-developers-bounces+robs=fastcgi.com at mailman.fastcgi.com [mailto:fastcgi-developers-bounces+robs=fastcgi.com at mailman.fastcgi.com] On Behalf Of Gabriel Petrovay Sent: Sunday, November 09, 2008 6:23 AM To: fastcgi-developers at mailman.fastcgi.com Subject: [FASTCGI] FastCGI and mod_rewrite don't go well together...?!? Bugor Feature or UI (as in "user incompetence")? Hi all, I use FastCGI together with mod_rewrite for a site. Here is my .htaccess file content for the DocumentRoot directory: AddHandler fastcgi-script .exe Options +FollowSymLinks +ExecCGI RewriteEngine On # rewrite empty URIs to /default/index RewriteRule ^$|^/$ /default/index [QSA] # if the requested path does not match a file, rewrite the URI and execute the fcgi script RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /fcgi-bin/sausa_fcgi.exe [QSA,L] --------------------- What I am trying to achieve is: I want to have the default page http://localhost/default/index when the user asks only for http://localhost or http://localhost/. The FastCGI script handles the request http://loclhost/default/index corectly. Meaning that I get my expected result. (FastCGI picks the /default/index resource from another location). When I log the internal requests for http://localhost/ I get the following list: / /default/index /fcgi-bin/sausa_fcgi.exe but inside the FCGI handler, the REQUEST_URI in request->envp tells me only "/". Does that mean that FastCGI cannot handle internal requests generated by RewriteRule (mod_rewrite) and can only give me only the initial request uri? I use the following FCGI library function calls: FCGX_Accept_r(&request) FCGX_GetParam("REQUEST_URI", request.envp) I was expecting that FCGX_GetParam returns "/default/index" and not "/" Thanks! Regards, -- MSc Gabriel Petrovay MCSA, MCDBA, MCAD Mobile: +41(0)787978034 -------------- next part -------------- An HTML attachment was scrubbed... URL: From robs at fastcgi.com Sun Nov 9 09:43:25 2008 From: robs at fastcgi.com (Rob Saccoccio) Date: Sun, 9 Nov 2008 09:43:25 -0500 Subject: [FASTCGI] mod_fastcgi apache 2.2.9 fcgi-pm In-Reply-To: References: <63B1A4D5F62C7B458A5B757A5EA8175004DC5004@S4DE8PSAANH.t-systems.com> Message-ID: <2BD9F3D6CCCC410483F75413630F576D@maisel> +1. (and don't worry about the truncated process name - that can happen) Rob > -----Original Message----- > From: fastcgi-developers-bounces+robs=fastcgi.com at mailman.fastcgi.com > [mailto:fastcgi-developers-bounces+robs=fastcgi.com at mailman.fastcgi.com] > On Behalf Of David Birnbaum > Sent: Friday, November 07, 2008 10:41 AM > To: Markus.Kummer at t-systems.com > Cc: fastcgi-developers at mailman.fastcgi.com > Subject: Re: [FASTCGI] mod_fastcgi apache 2.2.9 fcgi-pm > > Markus, > > Well, if it's permission denied, then have you walked through all the > permissions explicitly to make sure the user running fcgi (wwwrun?) can > get all > the way to the binary and exec it? Perhaps a truss/strace on the process > manager will be enlightening. > > David. > > ----- > > On Fri, 7 Nov 2008, Markus.Kummer at t-systems.com wrote: > > > Dear List Members, > > > > I can't get mod_fastcgi to work. > > The situation is as follows: > > > > - OS: Suse Linux Enterprise Server 9 x86_64 > > - apache 2.2.9 > > - mod_fastcgi-2.4.6 (and others: mod_fastcgi-2.4.0 with patch for apache > 2.2.; mod_fastcgi-SNAP-0809231057.tar.gz) > > > > 1. I build the module as described in INSTALL.AP2 > > > > # cd > > # cp Makefile.AP2 Makefile > > # make top_dir= > > > > The module builds without errors. Only one warning appears: > > > > fcgi_config.c: In function 'fcgi_config_new_auth_server': > > fcgi_config.c:1207: warning: cast from pointer to integer of different > size > > > > 2. I did the apache configuration > > > > ... > > LoadModule fastcgi_module modules/mod_fastcgi.so > > ... > > httpd.conf looks like: > > > > > > > > AllowOverride None > > Options None > > Order allow,deny > > Deny from all > > > > > > > > > > > > ScriptAlias /fcgi-bin/ /www/fcgi-bin/ > > FastCgiIpcDir /var/log/apache/fastcgi > > > > AllowOverride None > > Options +ExecCGI -Includes > > SetHandler fastcgi-script > > Order allow,deny > > Allow from all > > > > AddHandler fastcgi-script .fcg .fcgi .fpl > > > > > > 3. Start apache > > > > In the apache error log I find this: > > > > [notice] FastCGI: process manager initialized (pid 1376) > > > > When I look at the process it appears like this: > > > > # ps aux |grep fcgi > > wwwrun 1376 0.0 0.0 116392 4624 ? S 10:51 0:00 > /appl/local/apache/2.2.9/bin/fcgi- -k start > > > > My fastcgi application doesn't start with a permission denied error. > > > > So here comes my question: > > > > Is it possible that the module is broken or did I miss something in my > setup. > > > > I wonder where the pm of the fcgi-pm proccess has gone in the ps > listing. > > > > I use mod_fastcgi on two other servers without problem. The only > differences I see is that the process manager starts whithout the pm. > > > > If I am totally wrong here please direct me to the right place if > possible. > > If you need more detailed information please let me know. > > > > Thanks in advance! > > > > Best regards, > > > > Markus > > ================================== > > T-Systems Enterprise Services GmbH > > Systems Integration / ADSF / SF / Telco / Network Planning Systems > > Rabinstrasse 8 > > D- 53111 Bonn > > Tel: +49 228 9841 382 > > E-Mail: markus.kummer at t-systems.com > > > > T-Systems Enterprise Services GmbH > > Aufsichtsrat: René Obermann (Vorsitzender) Executive Committee: Reinhard > Clemens (Vorsitzender)*, Olaf Heyden*, Dr. Klaus Hofmann, Katrin > Horstmann, Joachim Langmack*, Dr. Stefan Schloter, Dr. Matthias Schuster*, > Zvezdana Seeger*, Klaus Werner*, Dr. Rolf Werner > > Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der > Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE87523644 *Geschäftsführer > gem. § 35 GmbHG > > > > Notice: This transmittal and/or attachments may be privileged or > confidential. If you are not the intended recipient, you are hereby > notified that you have received this transmittal in error; any review, > dissemination, or copying is strictly prohibited. If you received this > transmittal in error, please notify us immediately by reply and > immediately delete this message and all its attachments. Thank you. > > > > T-Systems - Business flexibility > > _______________________________________________ > > FastCGI-developers mailing list > > FastCGI-developers at mailman.fastcgi.com > > http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers > > From robs at fastcgi.com Sun Nov 9 09:48:27 2008 From: robs at fastcgi.com (Rob Saccoccio) Date: Sun, 9 Nov 2008 09:48:27 -0500 Subject: [FASTCGI] Content-Length header should be set usingap_set_content_length In-Reply-To: <1b5f39a10811051317u366b3bc8k846359bbea54ae11@mail.gmail.com> References: <49106765.9030901@ownmail.net> <1b5f39a10811051317u366b3bc8k846359bbea54ae11@mail.gmail.com> Message-ID: Honestly, I was going to do it this weekend, but then Artur sent in these nice patches. ;-) I'll roll another SNAP in a minute. If I can get some quick feedback (ideally under 1.3, 2.0 and 2.2), I'll tag it. Rob _____ From: fastcgi-developers-bounces+robs=fastcgi.com at mailman.fastcgi.com [mailto:fastcgi-developers-bounces+robs=fastcgi.com at mailman.fastcgi.com] On Behalf Of Jay Sprenkle Sent: Wednesday, November 05, 2008 4:18 PM To: David Birnbaum Cc: fastcgi-developers at mailman.fastcgi.com Subject: Re: [FASTCGI] Content-Length header should be set usingap_set_content_length When will a new version be released? I was wondering if I should wait for it or go with the old code. Thanks 2008/11/5 David Birnbaum Artur, Thanks for the patches - we'll take a peek and see about rolling them into the current SNAP before cutting a new version. -------------- next part -------------- An HTML attachment was scrubbed... URL: From robs at fastcgi.com Sun Nov 9 09:54:13 2008 From: robs at fastcgi.com (Rob Saccoccio) Date: Sun, 9 Nov 2008 09:54:13 -0500 Subject: [FASTCGI] Being hit by "FastCGI request processing timed out" In-Reply-To: <221469d10810271529v1bbb1076p290eca6b478e075a@mail.gmail.com> References: <221469d10810271529v1bbb1076p290eca6b478e075a@mail.gmail.com> Message-ID: <66FC1FE7FA634EED9C1FA7B5407EFE08@maisel> Please try the latest mod_fastcgi SNAP. It has a fix for a problem that manifests with this message. Rob > -----Original Message----- > From: fastcgi-developers-bounces+robs=fastcgi.com at mailman.fastcgi.com > [mailto:fastcgi-developers-bounces+robs=fastcgi.com at mailman.fastcgi.com] > On Behalf Of Ahmed Medhat > Sent: Monday, October 27, 2008 6:30 PM > To: fastcgi-developers at mailman.fastcgi.com > Subject: [FASTCGI] Being hit by "FastCGI request processing timed out" > > Hello, > > I am being hit by lots of this line... > > [Mon Oct 27 18:23:50 2008] [info] [client xxx.xxx.xxx.xxx] FastCGI > request processing timed out > > As well as a CPU load increasing, Below is my environment information... > > Apache 1.3.41 > mod_fastcgi-2.4.6 running FastCgiExternalServer with suexec wrapper > for each user connecting through a unix socket > > [Apache configuration] > KeepAlive On > MaxKeepAliveRequests 256 > KeepAliveTimeout 4 > MinSpareServers 96 > MaxSpareServers 128 > StartServers 96 > MaxClients 768 > MaxRequestsPerChild 400 > Timeout 32 > > Hope I could have given as much information as possible. > > > > -- > Thanks in Advance > _______________________________________________ > FastCGI-developers mailing list > FastCGI-developers at mailman.fastcgi.com > http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers From robs at fastcgi.com Sun Nov 9 10:18:01 2008 From: robs at fastcgi.com (Rob Saccoccio) Date: Sun, 9 Nov 2008 10:18:01 -0500 Subject: [FASTCGI] Connection status In-Reply-To: References: Message-ID: <12B74FC2F26545CDBD83ED75AFB1C524@maisel> If understand you correctly, I don't think that this can be done given the way that mod_fastcgi (and most socket based client-server applications) are written. And IIRC, this is area of OS code (listen queue and connect() handling) that varies quite a bit from platform to platform. mod_fastcgi connects to the application and immediately queues data for the connection. It's not until sometime later that the application will accept the connection and start reading the data. The OS provides the queue of pending connections (the listen/accept queue) and both the client and server side can hold buffered data. You haven't said why it is you want to do this (or why you're using this unusual architecture), but here are some ideas that might help: - Read the entire request before calling into tomcat. Unless you're uploading, incoming requests are generally very small and can easily fit a buffer. - Use non-blocking connects from mod_fastcgi (set appConnectTimeout to a non-zero value). This will cause mod_fastcgi to not enqueue the request if the timeout expires before the request is given a slot in your applications listen queue. - Reduce the listen queue depth in your application to 0 or 1 and use non-blocking connects from mod_fastcgi. This will increase request latency though. - Use longer timeouts on the mod_fastcgi side to reduce the likelihood. Rob > I'm implementing a scenario in which I'm starting up tomcat using a > fastcgi application. > I use a queue to stack up requests which gets served by a threadpool > in the application > that forwards the request to tomcat. > > I have a problem when it comes to handling timeout conditions. What's > happening is that > mod_fastcgi times out the request when it doesn't get a response from > tomcat. I need a > way of checking if the request that is queued is already timed out > before forwarding the request > to tomcat. I looked around a bit and didn't find a way to do this. > > Any ideas on this anyone? From simon at optinet.com Sun Nov 9 14:28:30 2008 From: simon at optinet.com (Simon) Date: Sun, 09 Nov 2008 14:28:30 -0500 Subject: [FASTCGI] FastCGI PHP runtime configuration Message-ID: <20081109192833.4A07B4763@smtp.chelsea.net> Hello, I know some of you guys use FastCGI to run PHP scripts. Had anyone figured out how to load runtime configuration parameters, such as those you can load from .htaccess if PHP is run as a module, for each instance of FCGI request? I know it is possible to load different php.ini for a poll of FCGI PHP processes but I need to be able to load different php.ini or set of runtime parameters for each FCGI PHP request from the same poll. Thanks, Simon From apex at xepa.nl Sun Nov 9 14:50:36 2008 From: apex at xepa.nl (Michiel Brandenburg) Date: Sun, 09 Nov 2008 20:50:36 +0100 Subject: [FASTCGI] FastCGI PHP runtime configuration In-Reply-To: <20081109192833.4A07B4763@smtp.chelsea.net> References: <20081109192833.4A07B4763@smtp.chelsea.net> Message-ID: <49173F0C.2070903@xepa.nl> Simon wrote: > I know some of you guys use FastCGI to run PHP scripts. Had anyone figured > out how to load runtime configuration parameters, such as those you can > load from .htaccess if PHP is run as a module, for each instance of FCGI request? > I know it is possible to load different php.ini for a poll of FCGI PHP processes > but I need to be able to load different php.ini or set of runtime parameters for > each FCGI PHP request from the same poll. If you use a wrapper around the php spawning process you can supply another php.ini that will be used. With php5 you can also supply runtime configurations while spawning. You can also load the mod htscanner into php that will scan .htaccess files for php settings (btw in php6 this will be default so no need to load htscanner for 6, not that there are a lot of ppl running 6 atm but still). Apache will bork when trying to read the htaccess file (with php settings) because it will not understand the php settings there. There are 2 options (I use them both). 1. wrap the php settings stuff in [setting here] to prevent Apache reading them (mod_php4 is not loaded so no problem), and htscanner will ignore the IfModule stuff. 2. load a dummy php mod that will only tell Apache it uses the php settings [and does absolutely nothing with them]. -- Michiel Brandenburg From simon at optinet.com Sun Nov 9 15:06:35 2008 From: simon at optinet.com (Simon) Date: Sun, 09 Nov 2008 15:06:35 -0500 Subject: [FASTCGI] FastCGI PHP runtime configuration In-Reply-To: <49173F0C.2070903@xepa.nl> Message-ID: <20081109200635.8F78A4A40@smtp.chelsea.net> Thanks a lot, I wasn't aware about htscanner, how does it impact the performance of scripts in your experience? Can you elaborate on using wrapper around php spawning process? unless I'm misunderstanding you, you do not need a wrapper, you can simply pass PHP ENV variable PHPRC and tell it which php.ini to load. I already do this but this is limited to the entire poll and is only done once when you re/start apache when it first creates the poll of FCGI PHP processes. The problem is I have different websites or even scripts within the same website using the same poll of FCGI PHP which need different runtime configuration, thus the need for something like loading from .htaccess Thank you! Simon On Sun, 09 Nov 2008 20:50:36 +0100, Michiel Brandenburg wrote: >Simon wrote: >> I know some of you guys use FastCGI to run PHP scripts. Had anyone figured >> out how to load runtime configuration parameters, such as those you can >> load from .htaccess if PHP is run as a module, for each instance of FCGI request? >> I know it is possible to load different php.ini for a poll of FCGI PHP processes >> but I need to be able to load different php.ini or set of runtime parameters for >> each FCGI PHP request from the same poll. >If you use a wrapper around the php spawning process you can supply >another php.ini that will be used. With php5 you can also supply >runtime configurations while spawning. >You can also load the mod htscanner into php that will scan .htaccess >files for php settings (btw in php6 this will be default so no need to >load htscanner for 6, not that there are a lot of ppl running 6 atm but >still). Apache will bork when trying to read the htaccess file (with >php settings) because it will not understand the php settings there. >There are 2 options (I use them both). 1. wrap the php settings stuff in > [setting here] > to prevent Apache reading them (mod_php4 is not loaded so no >problem), and htscanner will ignore the IfModule stuff. 2. load a dummy >php mod that will only tell Apache it uses the php settings [and does >absolutely nothing with them]. >-- >Michiel Brandenburg >_______________________________________________ >FastCGI-developers mailing list >FastCGI-developers at mailman.fastcgi.com >http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers -------------- next part -------------- An HTML attachment was scrubbed... URL: From arturz at ownmail.net Sun Nov 9 19:20:37 2008 From: arturz at ownmail.net (=?ISO-8859-2?Q?Artur_Zaprza=B3a?=) Date: Mon, 10 Nov 2008 01:20:37 +0100 Subject: [FASTCGI] GCC warnings fix Message-ID: <49177E55.10301@ownmail.net> When fcgi_config.c is compiled with -Wall switch, gcc will emit warnings like: format '%ld' expects type 'long int', but argument 3 has type 'uid_t' This patch will fix it. -------------- next part -------------- A non-text attachment was scrubbed... Name: mod_fastcgi-gcc.patch Type: text/x-patch Size: 1305 bytes Desc: not available URL: From Markus.Kummer at t-systems.com Mon Nov 10 03:52:40 2008 From: Markus.Kummer at t-systems.com (Markus.Kummer at t-systems.com) Date: Mon, 10 Nov 2008 09:52:40 +0100 Subject: [FASTCGI] mod_fastcgi apache 2.2.9 fcgi-pm In-Reply-To: <2BD9F3D6CCCC410483F75413630F576D@maisel> References: <63B1A4D5F62C7B458A5B757A5EA8175004DC5004@S4DE8PSAANH.t-systems.com> <2BD9F3D6CCCC410483F75413630F576D@maisel> Message-ID: <63B1A4D5F62C7B458A5B757A5EA8175004DC5226@S4DE8PSAANH.t-systems.com> Hi, It seems that my problem is not fcgi related. It's related to suidperl which gives the permission denied. >> 1. (and don't worry about the truncated process name - that can >> happen) That's good to hear. Thank you very much for your answers. Best regards, Markus > > Markus, > > Well, if it's permission denied, then have you walked through all the > permissions explicitly to make sure the user running fcgi (wwwrun?) > can get all the way to the binary and exec it? Perhaps a truss/strace > on the process manager will be enlightening. > > David. > > ----- > > On Fri, 7 Nov 2008, Markus.Kummer at t-systems.com wrote: > > > Dear List Members, > > > > I can't get mod_fastcgi to work. > > The situation is as follows: > > > > - OS: Suse Linux Enterprise Server 9 x86_64 > > - apache 2.2.9 > > - mod_fastcgi-2.4.6 (and others: mod_fastcgi-2.4.0 with patch for > > apache > 2.2.; mod_fastcgi-SNAP-0809231057.tar.gz) > > > > 1. I build the module as described in INSTALL.AP2 > > > > # cd > > # cp Makefile.AP2 Makefile > > # make top_dir= > > > > The module builds without errors. Only one warning appears: > > > > fcgi_config.c: In function 'fcgi_config_new_auth_server': > > fcgi_config.c:1207: warning: cast from pointer to integer of > > different > size > > > > 2. I did the apache configuration > > > > ... > > LoadModule fastcgi_module modules/mod_fastcgi.so ... > > httpd.conf looks like: > > > > > > > > AllowOverride None > > Options None > > Order allow,deny > > Deny from all > > > > > > > > > > > > ScriptAlias /fcgi-bin/ /www/fcgi-bin/ > > FastCgiIpcDir /var/log/apache/fastcgi > > > > AllowOverride None > > Options +ExecCGI -Includes > > SetHandler fastcgi-script > > Order allow,deny > > Allow from all > > > > AddHandler fastcgi-script .fcg .fcgi .fpl > > > > 3. Start apache > > > > In the apache error log I find this: > > > > [notice] FastCGI: process manager initialized (pid 1376) > > > > When I look at the process it appears like this: > > > > # ps aux |grep fcgi > > wwwrun 1376 0.0 0.0 116392 4624 ? S 10:51 0:00 > /appl/local/apache/2.2.9/bin/fcgi- -k start > > > > My fastcgi application doesn't start with a permission denied error. > > > > So here comes my question: > > > > Is it possible that the module is broken or did I miss something in > > my > setup. > > > > I wonder where the pm of the fcgi-pm proccess has gone in the ps > listing. > > > > I use mod_fastcgi on two other servers without problem. The only > differences I see is that the process manager starts whithout the pm. > > > > If I am totally wrong here please direct me to the right place if > possible. > > If you need more detailed information please let me know. > > > > Thanks in advance! > > > > Best regards, > > > > Markus > > ================================== > > T-Systems Enterprise Services GmbH > > Systems Integration / ADSF / SF / Telco / Network Planning Systems > > Rabinstrasse 8 > > D- 53111 Bonn > > Tel: +49 228 9841 382 > > E-Mail: markus.kummer at t-systems.com > > > > T-Systems Enterprise Services GmbH > > Aufsichtsrat: René Obermann (Vorsitzender) Executive Committee: > > Reinhard > Clemens (Vorsitzender)*, Olaf Heyden*, Dr. Klaus Hofmann, Katrin > Horstmann, Joachim Langmack*, Dr. Stefan Schloter, Dr. Matthias > Schuster*, Zvezdana Seeger*, Klaus Werner*, Dr. Rolf Werner > > Handelsregister: Amtsgericht Frankfurt am Main HRB 55933 Sitz der > Gesellschaft: Frankfurt am Main WEEE-Reg.-Nr. DE87523644 > *Geschäftsführer gem. § 35 GmbHG > > > > Notice: This transmittal and/or attachments may be privileged or > confidential. If you are not the intended recipient, you are hereby > notified that you have received this transmittal in error; any review, > dissemination, or copying is strictly prohibited. If you received this > transmittal in error, please notify us immediately by reply and > immediately delete this message and all its attachments. Thank you. > > > > T-Systems - Business flexibility > > _______________________________________________ > > FastCGI-developers mailing list > > FastCGI-developers at mailman.fastcgi.com > > http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers > > From shruthidipali at gmail.com Mon Nov 10 04:56:46 2008 From: shruthidipali at gmail.com (Shruthi Dipali) Date: Mon, 10 Nov 2008 15:26:46 +0530 Subject: [FASTCGI] Connection status In-Reply-To: <12B74FC2F26545CDBD83ED75AFB1C524@maisel> References: <12B74FC2F26545CDBD83ED75AFB1C524@maisel> Message-ID: Thanks for your response. I'll try and explain what I'm trying to in a better way. mod_fastcgi -> accept queue -> ( application -> main_thread -> internal/dedicated service queues -> dedicated thread pool -> tomcat) The above sort of explains the request flow. What the main thread does is, populates the dedicated service queues(one queue per service) with the request object from FCGX_Accept(). The configured/dedicated threads then pick up the request object from the queue to forward the request to tomcat. The problem is with handling timouts. The application accepts requests which are internally queued within the application. mod_fastcgi may abort the request after a specific time but the request is still queued within the application which eventually gets executed. I need a way(maybe a design change) to know if the request has already been aborted by mod_fastcgi so I don't forward the same to tomcat. > - Reduce the listen queue depth in your application to 0 or 1 and use > non-blocking connects from mod_fastcgi. This will increase request latency > though. This approach won't solve my problem because the requests are queued internally only after an accept. Even if one of the request queues is full, my main thread will have to block until this queue becomes empty to be able to accept requests to other services. This reduces the concurrency. Is there a better design approach in solving this problem? On Sun, Nov 9, 2008 at 8:48 PM, Rob Saccoccio wrote: > If understand you correctly, I don't think that this can be done given the > way that mod_fastcgi (and most socket based client-server applications) are > written. And IIRC, this is area of OS code (listen queue and connect() > handling) that varies quite a bit from platform to platform. > > mod_fastcgi connects to the application and immediately queues data for the > connection. It's not until sometime later that the application will accept > the connection and start reading the data. The OS provides the queue of > pending connections (the listen/accept queue) and both the client and server > side can hold buffered data. > > You haven't said why it is you want to do this (or why you're using this > unusual architecture), but here are some ideas that might help: > > - Read the entire request before calling into tomcat. Unless you're > uploading, incoming requests are generally very small and can easily fit a > buffer. > > - Use non-blocking connects from mod_fastcgi (set appConnectTimeout to a > non-zero value). This will cause mod_fastcgi to not enqueue the request if > the timeout expires before the request is given a slot in your applications > listen queue. > > - Reduce the listen queue depth in your application to 0 or 1 and use > non-blocking connects from mod_fastcgi. This will increase request latency > though. > > - Use longer timeouts on the mod_fastcgi side to reduce the likelihood. > > Rob > > >> I'm implementing a scenario in which I'm starting up tomcat using a >> fastcgi application. >> I use a queue to stack up requests which gets served by a threadpool >> in the application >> that forwards the request to tomcat. >> >> I have a problem when it comes to handling timeout conditions. What's >> happening is that >> mod_fastcgi times out the request when it doesn't get a response from >> tomcat. I need a >> way of checking if the request that is queued is already timed out >> before forwarding the request >> to tomcat. I looked around a bit and didn't find a way to do this. >> >> Any ideas on this anyone? > > > > From arturz at ownmail.net Mon Nov 10 05:23:59 2008 From: arturz at ownmail.net (=?ISO-8859-2?Q?Artur_Zaprza=B3a?=) Date: Mon, 10 Nov 2008 11:23:59 +0100 Subject: [FASTCGI] RPM support Message-ID: <49180BBF.3060207@ownmail.net> Here are the files that I use to build RPM package for Fedora. It would be nice to have them in mod_fasctcgi tarball. mod_fastcgi.spec has version number set to 2.4.7 and it must be updated with every release. To build binary rpm, just type (when the next version is released): rpmbuild -tb mod_fastcgi-2.4.7.tar.gz Using mod_fastcgi under Fedora with SELinux enabled requires a custom SELinux policy module, but I don't have one ready for release. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: mod_fastcgi.spec URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fastcgi.conf URL: From derekdeveloper at yahoo.com Tue Nov 11 19:49:41 2008 From: derekdeveloper at yahoo.com (Derek Developer) Date: Tue, 11 Nov 2008 16:49:41 -0800 (PST) Subject: [FASTCGI] configuring FastCGI for many binaries Message-ID: <391045.86685.qm@web44814.mail.sp1.yahoo.com> Hello! I am excited to find a list that deal's with Fast CGI, something I have had to wait three years to begin to implement as most web hosts will not install it in their commercial solutions. I have a nice new IIS ISAPI server and I Immediatly installed FastCGI so I can convert about 20 CGI "scripts" to FastCGI and implement an HTTP communication class that I wrote. My "scripts" are not really scripts becasue they are written in a C like language and are in fact compiled binaries. Unlike PHP there is not a single executable that you point FastCGI at which in turn hosts the PHP scripts. I have many executables. My first problem is setting up the fcgiext.ini file. I posted in the IIS forum but I don't know if that was the right place under "fast CGI Handler" I am not sure if I must create an entry for EACH of my cgi.exe executables or if I can just point to the cgi-exe folder so that ANY .exe file will be executed by the name specified in the POST or GET call. Also, I would like to send raw binary data with a POST statement. I can do this with regular CGI. Is there a preferred method in FastCGI? Has anyone implemented a Comet server? many thanks in advance :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From derekdeveloper at yahoo.com Tue Nov 11 19:51:07 2008 From: derekdeveloper at yahoo.com (Derek Developer) Date: Tue, 11 Nov 2008 16:51:07 -0800 (PST) Subject: [FASTCGI] Param_Array Message-ID: <192886.68780.qm@web44805.mail.sp1.yahoo.com> This is defined as typedef char **FCGX_ParamArray; I am used to the double indirection, but how do I enumerate all the elements without testing for a bad pointer when I run past the end? -------------- next part -------------- An HTML attachment was scrubbed... URL: From derekdeveloper at yahoo.com Wed Nov 12 03:56:20 2008 From: derekdeveloper at yahoo.com (Derek Developer) Date: Wed, 12 Nov 2008 00:56:20 -0800 (PST) Subject: [FASTCGI] FCGX_PutChar() Error code = 156 (0x9C) In-Reply-To: <192886.68780.qm@web44805.mail.sp1.yahoo.com> Message-ID: <291081.57724.qm@web44805.mail.sp1.yahoo.com> I am able to read ascci values for characters in the input stream ok. When I echo them to the output stream with FCGX_PutChar() I get the error code 156 (0x9C) What does this code mean? Is there a list of all the error codes available? The text that is returned is a series of ? in place of the characters. If I use FCGX_PutStr() all is good. What am I missing here? -------------- next part -------------- An HTML attachment was scrubbed... URL: From derekdeveloper at yahoo.com Wed Nov 12 07:21:47 2008 From: derekdeveloper at yahoo.com (Derek Developer) Date: Wed, 12 Nov 2008 04:21:47 -0800 (PST) Subject: [FASTCGI] FCGX_PutStr() GPFs yet FCGX_PutS() works fine Message-ID: <675609.52706.qm@web44801.mail.sp1.yahoo.com> Sorry to hit you all with so many questions, I have a deadline and I am behind for a simple project. I am able to recover bytes from the input stream with DLLAPI int FCGX_GetStr(char *str, int n, FCGX_Stream *stream) I am able to write bytes to the output stream with DLLAPI int FCGX_PutS(const char *str, FCGX_Stream *stream) yet using DLLAPI int FCGX_PutStr(const char *str, int n, FCGX_Stream *stream) GPFs my app everytime. I have doube and triple checked my call's. I am simply sending a pointer to a location in memory where I have created a string/array that can hold n Bytes... just as i do with the GetStr() I have worked on this for four hours tonite trying all kinds of things in case there is an "undocumented feature" with this function. I just cant get it to work. I need it to write binary data so I would greatly appreciate any pointers (pun intended) Kind Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From zasebnost at gmail.com Wed Nov 12 09:46:28 2008 From: zasebnost at gmail.com (FrEaKmAn) Date: Wed, 12 Nov 2008 15:46:28 +0100 Subject: [FASTCGI] FCGI error Message-ID: <3d149f5c0811120646t4777adbbn8a1f4289a50aeef9@mail.gmail.com> Hi, I'm still trying to figure it out who's fault this is. I'm doing simple AJAX request. You can see example here: beta(dot)m b a l c a n(dot)com/register (just join and replace dot - I don't want that this link gets indexed) - simply insert username bigger than 3 letters and hit "check if available". I get: FCGI ErrorError while parsing headers from script (in: /usr/www/users/xxx/beta) I'm sending json endoded data using zend framework. Now what could be a problem? Are there any standarts how headers should be built for fastcgi. Thanks for help, Erol -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicktook at gmail.com Wed Nov 12 15:27:08 2008 From: nicktook at gmail.com (Bryan White) Date: Wed, 12 Nov 2008 15:27:08 -0500 Subject: [FASTCGI] FCGI error In-Reply-To: <3d149f5c0811120646t4777adbbn8a1f4289a50aeef9@mail.gmail.com> References: <3d149f5c0811120646t4777adbbn8a1f4289a50aeef9@mail.gmail.com> Message-ID: <649cb4eb0811121227o5afefd84pcf9697f2be68902a@mail.gmail.com> > I'm sending json endoded data using zend framework. Now what could be a > problem? Are there any standarts how headers should be built for fastcgi. Mostly you just need a content type header, a blank line and then the content. -- Bryan White From davidb at pins.net Wed Nov 12 21:55:40 2008 From: davidb at pins.net (David Birnbaum) Date: Wed, 12 Nov 2008 21:55:40 -0500 Subject: [FASTCGI] Unsubscribe is not working In-Reply-To: <4914642E.6030104@ilstu.edu> References: <48F8A7BB.2040001@arcamax.com> <4914642E.6030104@ilstu.edu> Message-ID: <491B972C.1050803@pins.net> Maillist folk, I have seen the requests will take a peek at this to see what the problem is...please stand by. Thanks for letting me know. David. ------------------------------------------------------------------------ Phil Winans wrote: > Bryan White wrote: >> I am moving my mailing list email to another account. Toward that >> end I have been trying to unsub the FastCGI list from this account. >> It is not working. I have tried three times over the last month or >> so. The list volume is low enough that it often takes a week before >> I see new messages and learn that the unsub did not take. >> >> Twice I have used the HTTP link in the unsub confirmation email. The >> last time I replied to the confirmation email. That was on Oct 7th. >> >> Is there someone in a position to investigate what is going on? >> > > I'm having the same problem. I've tried to unsubscribe several times > to no effect. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From derekdeveloper at yahoo.com Thu Nov 13 22:41:39 2008 From: derekdeveloper at yahoo.com (Derek Developer) Date: Thu, 13 Nov 2008 19:41:39 -0800 (PST) Subject: [FASTCGI] Sockets and Ports in FastCGI Message-ID: <366714.9803.qm@web44805.mail.sp1.yahoo.com> When using FCGX_OpenSocket() I get the return code -12 What is this code? How do Sockets relate to ports in FastCGI? When I feed this number into: FCGX_InitRequest() I get zero (success) return. Why!? When I then call FCGX_PutStr() My lenght argument is igored and and 8k of binary garbage is returned befor the the executable GPF's. Can I be the first person to discover a problem with this FCGX_ function? I suspect ASP uses the FCGI functions and Stdio in which case it would have gone unnoticed. Does anyone know how to reach WadeH the author of the IIs 6.0 version -------------- next part -------------- An HTML attachment was scrubbed... URL: From Olivier.LeCam at crdp.ac-versailles.fr Fri Nov 14 13:13:37 2008 From: Olivier.LeCam at crdp.ac-versailles.fr (Olivier Le Cam) Date: Fri, 14 Nov 2008 19:13:37 +0100 Subject: [FASTCGI] Some delay for spawning process a second time Message-ID: <491DBFD1.8010108@crdp.ac-versailles.fr> Hi - Setup based on Apache (2.2.3-4+etch5) + libapache2-mod-fastcgi (2.4.2-8) + php5-cgi (5.2.6-0.dotdeb.1) Everything is working fine with this setup except for an abnormal long delay for spawning a new php5-cgi through suexec for the second time (after the first one has been killed). Way to repeat the problem: 1. Apache just (re)started 2. Access to a virtualhost, say http://test.mydomain.com This takes approx. 0.5s which is fine 2. Access to this site again This takes approx. 0.04s which is still fine 3. Wait that the spawned process php5-cgi for this virtualhost is killed by fcgi-pm. Then access to the site again. Now it takes more than 3s to get the php5-cgi spawned. After that, time access is back to normal (~0.04s) untill the process is killed (then the 3s delay come back for the next spawn). I have this in my Apache conf: FastCgiWrapper /usr/local/lib/apache2/suexec-fcgi FastCgiConfig -minProcesses 0 -maxClassProcesses 1 -maxProcesses 300 \ -processSlack 30 -singleThreshold 20 -killInterval 240 AddHandler php5-fastcgi .php .php3 .php4 .php5 SetHandler fastcgi-script Options +ExecCGI Action php5-fastcgi /cgi-bin/php5-fcgi AddType application/x-httpd-php .php5 And this is the cgi-bin/php5-fcgi wrapper: #!/bin/sh export PHPRC="/web/s/t/test/php-configs/php5/" export PHP_FCGI_CHILDREN=0 export PHP_FCGI_MAX_REQUESTS=1000 exec /usr/bin/php5-cgi I spends some time attaching strace to fcgi-pm and Apache process, but I sadly didn't get a chance to figure out what could be the problem. Does this sound to someone? Any help/hint/idea will be greatly appreciated. Thanks in anticipation! Regards, -- Olivier Le Cam CRDP de l'académie de Versailles From Patrick.Galbraith at lycos-inc.com Mon Nov 17 16:45:06 2008 From: Patrick.Galbraith at lycos-inc.com (Patrick Galbraith) Date: Mon, 17 Nov 2008 16:45:06 -0500 Subject: [FASTCGI] Where's the info? Message-ID: Hi all, I've been around, set up numerous servers in my life, configured all manner of things, but trying to get a working fast cgi setup is one of the most puzzling things I've had to do in a while. There's no concise source of information on how to simply get php working with FastCGI. I have Centos 5.2. and was excited when yum search showed me mod_finstall mod_fcgi thinking that was fast cgi, but it's some fast cgi clone made in china ( think, I can't really tell)... (http://fastcgi.coremail.cn/) What that heck??!!!! The config that is installed looks like: # This is the Apache server configuration file for providing FastCGI support # through mod_fcgid # # Documentation is available at http://fastcgi.coremail.cn/doc.htm LoadModule fcgid_module modules/mod_fcgid.so # Use FastCGI to process .fcg .fcgi & .fpl scripts # Don't do this if mod_fastcgi is present, as it will try to do the same thing AddHandler fcgid-script fcg fcgi fpl AddHandler fastcgi-script .fcgi .fcg .fpl # Sane place to put sockets and shared memory file SocketPath run/mod_fcgid SharememPath run/mod_fcgid/fcgid_shm This is really confusing. What is this? Is this FastCGI or an clone project? The documentation on the site they give is severely lacking. None of the suggested configurations they have on their site work either. Additionally, I can't get the fast cgi apache module to compile from your site to compile: in file included from /usr/include/features.h:352, from /usr/include/sys/types.h:27, from /usr/include/apr-1/apr-i386.h:113, from /usr/include/apr-1/apr.h:7, from /usr/include/httpd/ap_config.h:25, from /usr/include/httpd/httpd.h:43, from fcgi.h:22, from mod_fastcgi.c:72: /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory mod_fastcgi.c: In function 'open_connection_to_fs': mod_fastcgi.c:1083: warning: dereferencing type-punned pointer will break strict-aliasing rules make: *** [mod_fastcgi.slo] Error 1 All I want to do is run PHP using Fast CGI so I can take advantage of Suexec. I need to run PHP as the user it's owned by. Every site I look on has a different way to set up httpd to use Fast CGI, none of which work. Is Fast CGI maintained? Is this a route worth going down? Thanks in advance to any information that can help My setup: apache 2.2, centos 5.2 64-bit Kind regards, Patrick "CaptTofu" Galbraith -------------- next part -------------- An HTML attachment was scrubbed... URL: From agalkin at audible.com Tue Nov 18 17:12:37 2008 From: agalkin at audible.com (Alexander Galkin (Audible US)) Date: Tue, 18 Nov 2008 17:12:37 -0500 Subject: [FASTCGI] Rewriting CGI into FastCGI Message-ID: <8AD089992055F0408126B89B3E407B6707163726@EXVS02.HESungard.local> I moved my code from old CGI app into new FastCGI app. Now I want all requests that still going to old CGI script rewritten into new FastCGI script. Basically all requests going into http://www.myapacheserver.com/cgi-bin/old_cgi_app.exe?name=value go to http://www.myapacheserver.com/cgi-bin/new_fastcgi_app?name=value How do I configure Apache server to do this rewrite? -------------- next part -------------- An HTML attachment was scrubbed... URL: From zasebnost at gmail.com Sat Nov 29 16:54:05 2008 From: zasebnost at gmail.com (FrEaKmAn) Date: Sat, 29 Nov 2008 22:54:05 +0100 Subject: [FASTCGI] FCGI error In-Reply-To: <3d149f5c0811120646t4777adbbn8a1f4289a50aeef9@mail.gmail.com> References: <3d149f5c0811120646t4777adbbn8a1f4289a50aeef9@mail.gmail.com> Message-ID: <3d149f5c0811291354p6f96042bk9fe18d7a2ea9dd7e@mail.gmail.com> Hello Is there a way to check if FASTCGI is working correctly? Because few people mentioned: This is caused by the fast cgi program crashing.Check there. How can I check this? -------------- next part -------------- An HTML attachment was scrubbed... URL: