logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: FCGX_Accept does not work
Author
kevinBaobao



Joined: 26 Nov 2007
Posts: 2

PostPosted: Mon 26 Nov '07 10:23    Post subject: FCGX_Accept does not work Reply with quote

hi all.
i am very new in fcgi.I am writing a tiny fcgi app using apache2,fcgi-2.4.0, mod_fastcgi-2.4.6.

Code:

cout << "start" << endl;
while(FCGX_Accept(&in, &out, &err, &envp) >= 0)
{
cout << "do something" << endl;
}
cout << "end" << endl;


The code snippet above compiles with no errors.I wish the progamme wait for the incoming request with FCGX_Accept and process the request and then continue to wait for another request to come. But when i execute it.The output is :
Quote:
start
end


It seems that the program does not wait with FCGX_Accept() and jump directly out of the while loop. I don't know why.

I use the following line to start my program:
cgi-fcgi -start -connect 10.32.153.54:100011 ./FcgiService

And i have configured an entry in my apache httpd.conf file:
FastCgiExternalServer /home/intf/apache2/fcgi-bin/test_adc -idle-timeout 300 -host 10.32.153.54:100011

Could u give me some advice.Thank u very much
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7374
Location: Germany, Next to Hamburg

PostPosted: Mon 26 Nov '07 23:53    Post subject: Reply with quote

Please see this topic about fcgi accept

If you still have a question, please post again.
Back to top
kevinBaobao



Joined: 26 Nov 2007
Posts: 2

PostPosted: Tue 27 Nov '07 4:42    Post subject: Reply with quote

hi.

I am running the programme on hp-unix.The FCGX_Accept returned with
Quote:
error code: -14 error message: bad address


I have googled around but no answers.

Any ideas?
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Tue 27 Nov '07 14:42    Post subject: Reply with quote

The problem may be your host address:
Quote:
-host 10.32.153.54:100011

Port numbers are between 1 and 65535, so 100011 is an illegal port number.

-tom-
Back to top


Reply to topic   Topic: FCGX_Accept does not work View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner