Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
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.
| |
|
Topic: FCGX_Accept does not work |
|
Author |
|
kevinBaobao
Joined: 26 Nov 2007 Posts: 2
|
Posted: Mon 26 Nov '07 10:23 Post subject: FCGX_Accept does not work |
|
|
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 :
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
|
Posted: Mon 26 Nov '07 23:53 Post subject: |
|
|
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
|
Posted: Tue 27 Nov '07 4:42 Post subject: |
|
|
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
|
Posted: Tue 27 Nov '07 14:42 Post subject: |
|
|
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 |
|
|
|
|
|
|