Re: using libcurl/fastcgi
"Gordon Colburn" <gordon-ph3hwQsbQ5ZWk0Htik3J/[email protected]> Wed, 26 Jan 2011 00:15:30 -0500
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <97815BD017FD4C98BC82E4F038CB7D23@gordon641e39fb> |
Sorry, when I said:
Is the appropriate libcurl.so in your classpath when your fastcgi
application executes from lighttpd?
I meant to say:
Is the appropriate libcurl.so in your library path when your
fastcgi application executes from lighttpd? (it leads to confusion when you
program in both Java and C!)
Regards,
Gordon
_____
From: fastcgi-developers-bounces+gordon=group309.com-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
[mailto:fastcgi-developers-bounces+gordon=group309.com-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org]
On Behalf Of Gordon Colburn
Sent: Tuesday, January 25, 2011 11:50 PM
To: 'CHENG LIANG'; 'fastcgi'
Subject: Re: [FASTCGI] using libcurl/fastcgi
I frequently use libcurl from fastcgi on Linux from a C-language application
and it works well. I use Apache httpd rather than lighttpd, however. You
should check the following:
1. Does your libcurl application work stand-alone? Test a version of
your program from the command line and make sure that it works.
2. Is the appropriate libcurl.so in your classpath when your fastcgi
application executes from lighttpd?
3. Unlike traditional CGI applications, fast CGI applications do not
exit after each request. Ensure that you are not destroying global variables
or relying on initialization of static variables prior to each request.
4. Check threading issues. Is your fastcgi application single or multi
threaded? If multi, is you libcurl code thread-safe? Libcurl is thread-safe,
I believe, but is your code that calls libcurl thread safe?
If none of that helps, add a lot of writes to stderr in your application to
figure out where it is aborting (or use a debugger).
Best of luck,
Gordon
_____
From: fastcgi-developers-bounces+gordon=group309.com-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
[mailto:fastcgi-developers-bounces+gordon=group309.com-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org]
On Behalf Of CHENG LIANG
Sent: Saturday, January 22, 2011 5:53 PM
To: fastcgi
Subject: [FASTCGI] using libcurl/fastcgi
Hi
I am creating a server using fastcgi and lighttpd based on linux. I am using
c.
inside the server, I need send out a http request and store response to a
string. I write a function int curl_to_string(char *s_http_req, char*
s_http_res) which follow the code in the example getinmemory.c and I got
many many 500(Internal server error) errors. If fastcgi does not call this
function curl_to_string(), things goes well.
any help thanks.
Cheng Liang
_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers