curl-library
Fwd: Re: Libcurl Dying at Perform()
Date: Mon, 17 Aug 2009 16:17:57 +0200
---------- Forwarded Message ----------
Subject: Re: Libcurl Dying at Perform()
Date: Mon August 17 2009
From: Brandon Tate <brandonntate_at_gmail.com>
To: Kamil Dudka <kdudka_at_redhat.com>
On Aug 16, 2009, at 5:49 PM, Kamil Dudka wrote:
> On Sunday 16 of August 2009 23:43:31 Brandon Tate wrote:
>> I've been messing around quite a bit and have made some discoveries.
>>
>> 1) Can run examples from the command line (used google.com).
>> 2) Cgi doesn't crash if no URL Option is set.
>>
>> So, why would curl just die if a URL is set. Other options can be
>> set
>> without an issue. Maybe a permissions issue with outgoing
>> connections
>> in the cgi? Not sure how I would go about checking that. Any
>> insight/
>> suggestions?
>
> There can be different libraries used from the command line and
> different from
> the CGI script. Yes, there might be also a problem with permissions.
> But I
> have no experiences with CGI yet. Maybe someone else could give an
> advice.
>
> But at first you need to discover how does it die. Maybe you want to
> dig some
> CGI logs?
>
> Kamil
I set my settings to digest because of all the emails and I'm not sure
how to reply to one of those.
<-- Quote -->
What I would do is try to execute the program without using the http
server
environment. The CGI is an executable? Then, run in on the command
line and
try to debug it with GDB.
However, I just want to make sure you no longer have a linking
problem? Have
you got rid of the warning messages when linking?
<-- End Quote -->
I got rid of those errors, but that doesn't mean there isn't linking
errors. Running ldd on the cgi and on the example I get the following
which shows some discrepancies. Not really sure how to fix them
though. Got libssl in here twice, different libcurl versions for
testing.cgi and example06. the example doesn't appear to be loading
libcurlpp.
testing.cgi
libmysqlclient.so.10 => /usr/lib/mysql/libmysqlclient.so.10
(0x4001e000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x40055000)
libpfpro.so => /usr/local/verisign/payflowpro/linux/lib/
libpfpro.so (0x40082000)
libcurlpp.so.0 => /usr/lib/libcurlpp.so.0 (0x40128000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40152000)
libidn.so.11 => /usr/lib/libidn.so.11 (0x40205000)
libssh2.so.1 => /usr/lib/libssh2.so.1 (0x40236000)
libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x40257000)
libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x4028a000)
libldap.so.2 => /usr/lib/libldap.so.2 (0x4038f000)
libgssapi_krb5.so.2 => /usr/kerberos/lib/libgssapi_krb5.so.2
(0x403c1000)
libkrb5.so.3 => /usr/kerberos/lib/libkrb5.so.3 (0x403d4000)
libk5crypto.so.3 => /usr/kerberos/lib/libk5crypto.so.3
(0x40433000)
libz.so.1 => /usr/lib/libz.so.1 (0x40443000)
libm.so.6 => /lib/tls/libm.so.6 (0x40451000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40473000)
libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x4047b000)
libcurl.so.4 => /usr/lib/libcurl.so.4 (0x4048a000)
libnsl.so.1 => /lib/libnsl.so.1 (0x4051c000)
libssl.so.4 => /lib/libssl.so.4 (0x40531000)
libcom_err.so.3 => /usr/kerberos/lib/libcom_err.so.3
(0x40566000)
libresolv.so.2 => /lib/libresolv.so.2 (0x40568000)
libdl.so.2 => /lib/libdl.so.2 (0x4057b000)
liblber.so.2 => /usr/lib/liblber.so.2 (0x4057f000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x4058b000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
example06
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4001e000)
libcurl.so.3 => /usr/local/lib/libcurl.so.3 (0x400d1000)
libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x400fe000)
libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0x40131000)
libdl.so.2 => /lib/libdl.so.2 (0x40236000)
libz.so.1 => /usr/lib/libz.so.1 (0x4023a000)
libm.so.6 => /lib/tls/libm.so.6 (0x40249000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4026b000)
libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
<--- Quote --->
Have you tried to strip all options (except the URL) and then see if it
crashes. You
mentionned in curlpp mailing-list that the examples were working. So, if
your CGI
crashes even though no options other that the URL is set, then it's
99% sure
that you got a library linking problem.
<----- End Quote ---->
Yes, I've tried stripping everything else out. It's almost certainly
the url.
-------------------------------------------------------
Received on 2009-08-17