From jeff_j_dunlap at yahoo.com Tue Jun 2 20:09:06 2009 From: jeff_j_dunlap at yahoo.com (Jeff Dunlap) Date: Tue, 2 Jun 2009 17:09:06 -0700 (PDT) Subject: [FASTCGI] Apache capability similar to Windows IIS Extensions? Message-ID: <191408.31751.qm@web33904.mail.mud.yahoo.com> Hello, I am new to this group and am thinking about trying FastCGI out with Apache. I found a very interesting post at http://www.webmasterworld.com/apache/3925172.htm Would an Apache extension be faster than FastCGI? Thank you From m.kofahl at gmx.net Thu Jun 4 15:40:14 2009 From: m.kofahl at gmx.net (Martin Kofahl) Date: Thu, 04 Jun 2009 21:40:14 +0200 Subject: [FASTCGI] low performance with multiple cpu (compare to cgi) Message-ID: <4A28231E.7060107@gmx.net> Hi, I wonder about that a process (it's mapserv actually) compiled and configured as fast-cgi is much more slower than running as common cgi in apache2. When testing performance with apaches ab with 20 concurrent requests, I found out that there's only one mapserv-fcgi process created by fcgid and attatched to one httpd while there are a couple of mapserv-cgi processes with an httpd for each one. Even more suspicious: the fcgi configurazion uses one cpu at 80% but the cgi configuration takes all 4 cpus at 100%. fcgi configuration is "FastCgiConfig -initial-env PROJ_LIB=/usr/local/share/proj -initial-env LD_LIBRARY_PATH=/usr/local/lib:/usr/local/pgsql/lib -appConnTimeout 60 -idle-timeout 60 -init-start-delay 1 -minProcesses 2 -maxClassProcesses 20 -startDelay 5" and fcgi appears to work in general, because the mapserv-fcgi process doesn't die but processes all requests ony by one. Thanks for any hints. Martin From sxk1969 at hotmail.com Wed Jun 10 16:47:45 2009 From: sxk1969 at hotmail.com (Saikat Kanjilal) Date: Wed, 10 Jun 2009 13:47:45 -0700 Subject: [FASTCGI] Binary Data Message-ID: Hi Folks: I'm interested in rendering binary font and glyph data dynamically from a service written in C and fastcgi using Apache, I was wondering what the correct mime_type for this should be in my fastcgi application, currently I have the following: FCGX_FPrintF(out,"Content-type: application/octet-stream\r\nStatus: 200 OK\r\n\r\n"); Is this correct, whenever I call my fastcgi app the browser immediately asks me what to do with my fastcgi application instead of executing it and rendering the dynamic font and glyph data. Any help and insight would be much appreciated. Best Regards _________________________________________________________________ Lauren found her dream laptop. Find the PC that?s right for you. http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sxk1969 at hotmail.com Wed Jun 10 17:02:48 2009 From: sxk1969 at hotmail.com (Saikat Kanjilal) Date: Wed, 10 Jun 2009 14:02:48 -0700 Subject: [FASTCGI] Binary Data In-Reply-To: <1b5f39a10906101351l2b5f0827oec2823c3514ec41f@mail.gmail.com> References: <1b5f39a10906101351l2b5f0827oec2823c3514ec41f@mail.gmail.com> Message-ID: Its definitely not an image,its could be an open type font and other types of fonts and glyph data, specifically I want to return a character buffer through stdout back to the client (meaning I want to return a stream containing this character buffer containing this binary font/glyph data). Date: Wed, 10 Jun 2009 15:51:17 -0500 Subject: Re: [FASTCGI] Binary Data From: jsprenkle at gmail.com To: sxk1969 at hotmail.com The content type should match the file type. If it's a gif image you use 'Content-type: image/gif'' What kind of file is "font and glyph" data? Is this a true type font? On Wed, Jun 10, 2009 at 3:47 PM, Saikat Kanjilal wrote: Hi Folks: I'm interested in rendering binary font and glyph data dynamically from a service written in C and fastcgi using Apache, I was wondering what the correct mime_type for this should be in my fastcgi application, currently I have the following: FCGX_FPrintF(out,"Content-type: application/octet-stream\r\nStatus: 200 OK\r\n\r\n"); Is this correct, whenever I call my fastcgi app the browser immediately asks me what to do with my fastcgi application instead of executing it and rendering the dynamic font and glyph data. Hotmail® has ever-growing storage! Don?t worry about storage limits. Check it out. _________________________________________________________________ Windows Live?: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sxk1969 at hotmail.com Wed Jun 10 17:16:01 2009 From: sxk1969 at hotmail.com (Saikat Kanjilal) Date: Wed, 10 Jun 2009 14:16:01 -0700 Subject: [FASTCGI] Binary Data In-Reply-To: <1b5f39a10906101405pa3974b6j3136e5188238081a@mail.gmail.com> References: <1b5f39a10906101351l2b5f0827oec2823c3514ec41f@mail.gmail.com> <1b5f39a10906101405pa3974b6j3136e5188238081a@mail.gmail.com> Message-ID: Hi Jay: Thanks for the response, I use the browser only as an example, my client could be any application and not necessarily a browser,what i am really wondering about is how to return this binary font/glyph data that my fastcgi application generates back to the caller (caller can be a flex/air/php/perl application or anything else), meaning: 1) How can I set the mime type correctly in my fastcgi application so that any of the clients mentioned above can receive and embed this binary font/glyph data into their documents. 2) Are there limitations in fastcgi where I could only send back chunks of the data at a time (if its a large font/glyph)? Bear with me I am venturing into uncharted territory here. Thanks in advance Date: Wed, 10 Jun 2009 16:05:29 -0500 Subject: Re: [FASTCGI] Binary Data From: jsprenkle at gmail.com To: sxk1969 at hotmail.com You're creating something new so there won't be an existing content type for it. You'll have to create one and tell the browser what to do with it when it receives it. Here's the help for that option in firefox On Wed, Jun 10, 2009 at 3:57 PM, Saikat Kanjilal wrote: Its definitely not an image,its actually open type font and other types of fonts and glyph data, additionally I want to return a character buffer through stdout back to the caller (meaning I am not actually returning a file but a stream containing this character buffer containing binary data). Date: Wed, 10 Jun 2009 15:51:17 -0500 Subject: Re: [FASTCGI] Binary Data From: jsprenkle at gmail.com To: sxk1969 at hotmail.com The content type should match the file type. If it's a gif image you use 'Content-type: image/gif'' What kind of file is "font and glyph" data? Is this a true type font? On Wed, Jun 10, 2009 at 3:47 PM, Saikat Kanjilal wrote: Hi Folks: I'm interested in rendering binary font and glyph data dynamically from a service written in C and fastcgi using Apache, I was wondering what the correct mime_type for this should be in my fastcgi application, currently I have the following: FCGX_FPrintF(out,"Content-type: application/octet-stream\r\nStatus: 200 OK\r\n\r\n"); Is this correct, whenever I call my fastcgi app the browser immediately asks me what to do with my fastcgi application instead of executing it and rendering the dynamic font and glyph data. Hotmail® has ever-growing storage! Don?t worry about storage limits. Check it out. -- -- The PixAddixImage Collector suite: http://groups-beta.google.com/group/pixaddix SqliteImporter and SqliteReplicator: Command line utilities for Sqlite --- On Wednesday, March 1, 2006, at a hearing on the proposed Constitutional Amendment to prohibit gay marriage, Jamie Raskin, professor of law at AU, was requested to testify. At the end of his testimony, Republican Senator Nancy Jacobs said: "Mr. Raskin, my Bible says marriage is only between a man and a woman. What do you have to say about that?" Raskin replied: "Senator, when you took your oath of office, you placed your hand on the Bible and swore to uphold the Constitution. You did not place your hand on the Constitution and swear to uphold the Bible." The room erupted into applause. http://www.reddawn.net/~jsprenkl/Sqlite _________________________________________________________________ Windows Live?: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sxk1969 at hotmail.com Thu Jun 11 00:12:33 2009 From: sxk1969 at hotmail.com (Saikat Kanjilal) Date: Wed, 10 Jun 2009 21:12:33 -0700 Subject: [FASTCGI] Binary Data In-Reply-To: <1b5f39a10906102008p4e174047i46366af12cdfa65f@mail.gmail.com> References: <1b5f39a10906101351l2b5f0827oec2823c3514ec41f@mail.gmail.com> <1b5f39a10906101405pa3974b6j3136e5188238081a@mail.gmail.com> <1b5f39a10906102008p4e174047i46366af12cdfa65f@mail.gmail.com> Message-ID: Hi Jay: Thanks for the response the fastcgi application returns a header that tells about the content. It consists of the content-type and the size. It would look something like this: print "Content-type: text/html\r\n\r\n"; I already understand this and am using the above line in my program, however what I am asking is whether I need to set the Content-type to text/html or something else when returning font or glyph type binary data 2) Are there limitations in fastcgi where I could only send back chunks of the data at a time (if its a large font/glyph)? Not in fastcgi. The limitations are more practical. Sending really really large files tends to fail. A font is probably not going to be a problem. Again just so I'm clear I'm not sending back any files, I am sending back a stream containing a character buffer containing the glyph and font data. Date: Wed, 10 Jun 2009 22:08:00 -0500 Subject: Re: [FASTCGI] Binary Data From: jsprenkle at gmail.com To: sxk1969 at hotmail.com On Wed, Jun 10, 2009 at 4:16 PM, Saikat Kanjilal wrote: Hi Jay: Thanks for the response, I use the browser only as an example, my client could be any application and not necessarily a browser,what i am really wondering about is how to return this binary font/glyph data that my fastcgi application generates back to the caller (caller can be a flex/air/php/perl application or anything else), meaning: 1) How can I set the mime type correctly in my fastcgi application so that any of the clients mentioned above can receive and embed this binary font/glyph data into their documents. the fastcgi application returns a header that tells about the content. It consists of the content-type and the size. It would look something like this: print "Content-type: text/html\r\n\r\n"; print "Hello, World."; There are many example on the web if you use google. Search for 'content-type' and cgi. There's no difference between what is done for fastcgi and cgi. 2) Are there limitations in fastcgi where I could only send back chunks of the data at a time (if its a large font/glyph)? Not in fastcgi. The limitations are more practical. Sending really really large files tends to fail. A font is probably not going to be a problem. _________________________________________________________________ Lauren found her dream laptop. Find the PC that?s right for you. http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sxk1969 at hotmail.com Thu Jun 11 11:11:04 2009 From: sxk1969 at hotmail.com (Saikat Kanjilal) Date: Thu, 11 Jun 2009 08:11:04 -0700 Subject: [FASTCGI] Binary Data In-Reply-To: <1b5f39a10906110515n68fbcce1i9193716d595567e2@mail.gmail.com> References: <1b5f39a10906101351l2b5f0827oec2823c3514ec41f@mail.gmail.com> <1b5f39a10906101405pa3974b6j3136e5188238081a@mail.gmail.com> <1b5f39a10906102008p4e174047i46366af12cdfa65f@mail.gmail.com> <1b5f39a10906110515n68fbcce1i9193716d595567e2@mail.gmail.com> Message-ID: Thanks for the response, my apologies if I was unclear about my goals, so what I need to accomplish is to send back this stream of binary (font/glyph) data which is essentially a character array, I have two choices I can either use:application/octet-stream or make up my own format, if I make up my own format then each client will need to figure out what to do with data that's in my new format, I am leaning towards using application/octet-stream at the moment. If you have any other suggestions for help please let me know Date: Thu, 11 Jun 2009 07:15:05 -0500 Subject: Re: [FASTCGI] Binary Data From: jsprenkle at gmail.com To: sxk1969 at hotmail.com I already understand this and am using the above line in my program, however what I am asking is whether I need to set the Content-type to text/html or something else when returning font or glyph type binary data If you set the content type to html it will display garbage or nothing. The browser reads a stream of data with that type, assumes it's text (not binary) and tries to display it as html. Html does not include images or fonts, they are loaded separately. When asking for help if you're confused about how things work you should probably tell what you are trying to accomplish. Sometimes others may see a different path to your goal than you considered and can suggest it. _________________________________________________________________ Windows Live? SkyDrive?: Get 25 GB of free online storage. http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsprenkle at gmail.com Thu Jun 11 11:17:03 2009 From: jsprenkle at gmail.com (Jay Sprenkle) Date: Thu, 11 Jun 2009 10:17:03 -0500 Subject: [FASTCGI] Binary Data In-Reply-To: References: <1b5f39a10906101351l2b5f0827oec2823c3514ec41f@mail.gmail.com> <1b5f39a10906101405pa3974b6j3136e5188238081a@mail.gmail.com> <1b5f39a10906102008p4e174047i46366af12cdfa65f@mail.gmail.com> <1b5f39a10906110515n68fbcce1i9193716d595567e2@mail.gmail.com> Message-ID: <1b5f39a10906110817s3ab88e60hf03b19aa529f512c@mail.gmail.com> If your new format has some value why not create a new content-type for it? If it has a new specific type then you can write plugins to use it (like pdf, flash, etc). If all you're doing is sending back fonts for rendering the page there are probably already types defined for fonts. On Thu, Jun 11, 2009 at 10:11 AM, Saikat Kanjilal wrote: > Thanks for the response, my apologies if I was unclear about my goals, so > what I need to accomplish is to send back this stream of binary (font/glyph) > data which is essentially a character array, I have two choices I can either > use:application/octet-stream or make up my own format, if I make up my own > format then each client will need to figure out what to do with data that's > in my new format, I am leaning towards using application/octet-stream at the > moment. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kornelpal at gmail.com Thu Jun 11 13:41:45 2009 From: kornelpal at gmail.com (=?UTF-8?B?S29ybsOpbCBQw6Fs?=) Date: Thu, 11 Jun 2009 19:41:45 +0200 Subject: [FASTCGI] Patch to close cgi-fcgi -f file descriptor Message-ID: <4A3141D9.7010201@gmail.com> Hi, cgi-fcgi is currently leaking the file descriptor opened for -f file when forking the FastCGI application process. Please commit the attached simple patch to SVN. Thanks. Kornél -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: cgi-fcgi.diff.txt URL: From ricsal at gmail.com Mon Jun 15 08:09:58 2009 From: ricsal at gmail.com (Ricardo Sal) Date: Mon, 15 Jun 2009 13:09:58 +0100 Subject: [FASTCGI] Issue on Header field with more then 127 bytes Message-ID: <3f9606c30906150509l3ed8b578y4b77f7bccd99a20d@mail.gmail.com> Hello to you all, I was able to implement fast cgi from some communication sniffs that I was able to get. During my tests (with Firefox and Chrome) all was working fine until i tested with IE (I get connection reset by php-cgi). I was able to trace the problem to the Accept: field that is bigger then 127 bytes. If I change the field to be smaller i am able to make IE work just fine. The length encode is been well implemented for what i can tell and have tested (in attach you can see, with a Hex app, that all is well encoded), unless there is an exception for this particular field or something. I have tested with both PHP 5.2.9 and 5.2 RC2. Did any of you ever had this problem, if so how did you solve it? Thanks in advance, Ricardo -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ww_287post.tmpxpto.txt URL: From jeff at interchange.ca Mon Jun 15 12:44:51 2009 From: jeff at interchange.ca (Jeff MacDonald) Date: Mon, 15 Jun 2009 13:44:51 -0300 Subject: [FASTCGI] CGIApp + FastCGI Message-ID: <7C0927E3-B625-4E65-A71C-4F8D7F66BF9D@interchange.ca> Hi, I'm cross posting this to CGIApp and FastCGI mailing lists, please don't hit me :) I've taken over the development of a Perl/CGI::App in house project. It has never lived its live in any sort of environment like FastCGI or mod_perl and now perl startup times are starting to eat away at performance. [Actually they are destroying preformance] I've tried running this application using both FastCGIServer and by using the AddHandler directive to allow dynamic restarting of the application. The Perl FastCGI module I am using with my application is CGI::Application::FastCGI If I ran it with only one -process the results were predictable. The application ran very quickly, screens came up as expected and it ran generally without errors. However, when I was gearing up to shift into production, and turned the processes up to 5 it because very unpredictable. It felt like for some reason, one session was grabbing variables from other sessions. Thus loading the wrong templates for some sessions, or using the results of one query object in the wrong session and all that. More or less made the system impossible to use. I'm not sure what guidelines I should be following to protect against memory sharing, or if that is even an appropriate description of my issue. If anyone can point me in a direction that would be helpful. -- Jeff MacDonald jeff at interchange.ca From ricsal at gmail.com Wed Jun 17 15:57:07 2009 From: ricsal at gmail.com (Ricardo Sal) Date: Wed, 17 Jun 2009 20:57:07 +0100 Subject: [FASTCGI] FastCGI-developers Digest, Vol 11, Issue 6 In-Reply-To: References: Message-ID: <3f9606c30906171257p7ec1d4f8n43f7bf670982fae@mail.gmail.com> Fixed I need to buy some glasses :) Regards On Mon, Jun 15, 2009 at 5:00 PM, < fastcgi-developers-request at mailman.fastcgi.com> wrote: > Send FastCGI-developers mailing list submissions to > fastcgi-developers at mailman.fastcgi.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers > or, via email, send a message with subject or body 'help' to > fastcgi-developers-request at mailman.fastcgi.com > > You can reach the person managing the list at > fastcgi-developers-owner at mailman.fastcgi.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of FastCGI-developers digest..." > > > Today's Topics: > > 1. Issue on Header field with more then 127 bytes (Ricardo Sal) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 15 Jun 2009 13:09:58 +0100 > From: Ricardo Sal > Subject: [FASTCGI] Issue on Header field with more then 127 bytes > To: fastcgi-developers at mailman.fastcgi.com > Message-ID: > <3f9606c30906150509l3ed8b578y4b77f7bccd99a20d at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hello to you all, > > I was able to implement fast cgi from some communication sniffs that I was > able to get. > During my tests (with Firefox and Chrome) all was working fine until i > tested with IE (I get connection reset by php-cgi). > > I was able to trace the problem to the Accept: field that is bigger then > 127 > bytes. > If I change the field to be smaller i am able to make IE work just fine. > > The length encode is been well implemented for what i can tell and have > tested (in attach you can see, with a Hex app, that all is well encoded), > unless there is an exception for this particular field or something. > > I have tested with both PHP 5.2.9 and 5.2 RC2. > > Did any of you ever had this problem, if so how did you solve it? > > Thanks in advance, > Ricardo > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.pins.net/mailman/private.cgi/fastcgi-developers/attachments/20090615/c4f4dd25/attachment-0001.html > > > -------------- next part -------------- > An embedded and charset-unspecified text was scrubbed... > Name: ww_287post.tmpxpto.txt > URL: < > http://mailman.pins.net/mailman/private.cgi/fastcgi-developers/attachments/20090615/c4f4dd25/attachment-0001.txt > > > > ------------------------------ > > _______________________________________________ > FastCGI-developers mailing list > FastCGI-developers at mailman.fastcgi.com > http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers > > > End of FastCGI-developers Digest, Vol 11, Issue 6 > ************************************************* > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave at shareadvantage.co.za Sat Jun 20 02:50:40 2009 From: dave at shareadvantage.co.za (TSA Dave) Date: Sat, 20 Jun 2009 08:50:40 +0200 Subject: [FASTCGI] Need to disable buffering Message-ID: <005601c9f173$9184eab0$8c01a8c0@TSASVR4> Greetings Can anyone please advise how I can disable the buffering in fastCGI. We have a Linux server running a Debian OS. fastCGI is installed as well as php4. Previous we were using normal CGI php4. The php command 'flush()' that was outputting data during the php process ( normal CGI ) is now not outputting on fastCGI -- it is buffering all the data until the php process is completed, and then outputting to the browser. How can we set the fastCGI to flush the output to the browser as it is receiving the flushed data from the php process ? As I am a novice, could you plese tell me exactly what to add / change and in which file on the Linux server ? Any help would be greatly appreciated. Regards, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From apex at xepa.nl Sat Jun 20 14:28:55 2009 From: apex at xepa.nl (Michiel Brandenburg) Date: Sat, 20 Jun 2009 20:28:55 +0200 Subject: [FASTCGI] Need to disable buffering In-Reply-To: <005601c9f173$9184eab0$8c01a8c0@TSASVR4> References: <005601c9f173$9184eab0$8c01a8c0@TSASVR4> Message-ID: <4A3D2A67.5020609@xepa.nl> Hi Dave, > Can anyone please advise how I can disable the buffering in fastCGI. > We have a Linux server running a Debian OS. > fastCGI is installed as well as php4. > Previous we were using normal CGI php4. > The php command 'flush()' that was outputting data during the php > process ( normal CGI ) is now not outputting on fastCGI -- it is > buffering all the data until the php process is completed, and then > outputting to the browser. > How can we set the fastCGI to flush the output to the browser as it is > receiving the flushed data from the php process ? I think you can do this by using -flush as a parameter, but to be sure check the documentation at http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html > As I am a novice, could you plese tell me exactly what to add / change > and in which file on the Linux server ? Find the file in your /etc/ directory that contains the "" statement. Some places to look: with apache: /etc/apache/conf.d/fastcgi.conf with apache2: /etc/apache2/mods-enabled/fastcgi.conf Look for the statement FastCgiConfig (add it if it's not there) prepend -flush That should do the job, hope it helps -- Michiel Brandenbug From isambard1 at hotmail.com Wed Jun 24 15:06:53 2009 From: isambard1 at hotmail.com (isambard) Date: Wed, 24 Jun 2009 21:06:53 +0200 Subject: [FASTCGI] FCGI echo example unstable under load? Message-ID: <4A42794D.7080703@hotmail.com> I compiled the echo.fcgi example using gcc on a 64bit debian lenny box. I then used Nginx as a webserver. Testing the connection shows the FCGI is called and echos fine. Using apache benchmark with -c 1 -n 1000 works fine and performance is good. increasing concurrency to -c 10 causes problems: on first run, everything may go well. on, say, the second run, the first 700 requests may go fast but then last few hundred take several seconds. running again causes same problems but even slower and the application may hang/crash (nginx still works fine). in such a case the application dies and no data is returned. does anyone else have the same experience or just me? I'm using spawn_fcgi to launch the echo.fcgi process. From greg.denton at gmail.com Thu Jun 25 22:42:00 2009 From: greg.denton at gmail.com (Gregory Denton) Date: Thu, 25 Jun 2009 19:42:00 -0700 Subject: [FASTCGI] REST framework C++ library Message-ID: FYI - I have released a simple C++ library that works with fcgi and provides a framework for implementing a REST-style web service interface. I've been using it on a production (but low volume) sever for a while without apparent problems. http://sourceforge.net/projects/restcgi/ (requires http://sourceforge.net/projects/uripp/ as well) Thanks to the list for all the help and insights over the years. From sxk1969 at hotmail.com Fri Jun 26 11:11:52 2009 From: sxk1969 at hotmail.com (Saikat Kanjilal) Date: Fri, 26 Jun 2009 08:11:52 -0700 Subject: [FASTCGI] Apache fastcgi issue Message-ID: Hello Folks: I'm using Apache and fastcgi to develop a server side static fastcgi C application. What I would like to do is to pass in 3 different values (delineating different unix filepaths and directories) to the fastcgi application when it starts up. I've read the mod_fastcgi docs in detail and they specify the following: -initial-env name[=[value]] (none) A name-value pair to be passed in the FastCGI application's initial environment. To pass a variable from Apache's environment, don't provide the "=" (if the variable isn't actually in the environment, it will be defined without a value). To define a variable without a value, provide the "=" without any value. The option can be used repeatedly. So after reading the above I added the following in my httpd.conf file: FastCgiServer /path/to/my/fastcgiapp -initial-env 'clientconfigfile=/path/to/my/config' My application starts up fine but when I try to use getenv("clientconfigfile") or FCGX_GetParam("clientconfigfile",env) to try to access the contents of the environment variable passed in neither seem to work. So I then tried to remove the equals sign inside my httpd.conf like the following: FastCgiServer /path/to/my/fastcgiapp -initial-env 'clientconfigfile /path/to/my/config' My fastcgi application didnt start at all in the above case, if someone has used the above argument can they provide some examples on how to get that working for a static Fastcgi application, and more importantly how to then access the contents of that environment variable inside the C code. Thanks very much for your help. SK _________________________________________________________________ Hotmail® has ever-growing storage! Don?t worry about storage limits. http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009 -------------- next part -------------- An HTML attachment was scrubbed... URL: From hww at wilber.pointclark.net Thu Jun 25 02:20:31 2009 From: hww at wilber.pointclark.net (Matt) Date: Thu, 25 Jun 2009 16:20:31 +1000 Subject: [FASTCGI] FCGI echo example unstable under load? References: <4A42794D.7080703@hotmail.com> Message-ID: How are you testing? Can you please explain how you set it up? I've got a 64 bit box and I'm running FCGI as well and would love to test this out. "isambard" wrote in message news:4A42794D.7080703 at hotmail.com... I compiled the echo.fcgi example using gcc on a 64bit debian lenny box. I then used Nginx as a webserver. Testing the connection shows the FCGI is called and echos fine. Using apache benchmark with -c 1 -n 1000 works fine and performance is good. increasing concurrency to -c 10 causes problems: on first run, everything may go well. on, say, the second run, the first 700 requests may go fast but then last few hundred take several seconds. running again causes same problems but even slower and the application may hang/crash (nginx still works fine). in such a case the application dies and no data is returned. does anyone else have the same experience or just me? I'm using spawn_fcgi to launch the echo.fcgi process. From stijn at yoy.be Mon Jun 29 09:54:59 2009 From: stijn at yoy.be (Stijn Sanders) Date: Mon, 29 Jun 2009 15:54:59 +0200 Subject: [FASTCGI] download Windows binaries? Message-ID: <723d09e70906290654o57b55dbdj2a19a256d44f71b7@mail.gmail.com> Are Windows binaries available online? I would like to use "cgi-fcgi(.exe)" to test my FastCGI application, but the Visual Studio 2005 I have here refuses to open cgifcgi.dsp stating: "Cannot load the project due to a corrupt project file." Greetings Stijn -------------- next part -------------- An HTML attachment was scrubbed... URL: