cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: CURLOPT_UPLOAD gives me a Seg Fault

From: Raoul Mackle <raoul_at_nexus.net.nz>
Date: Mon, 17 Jun 2002 19:54:59 +1200

Thank you Daniel. I have only just got back to finishing this job so sorry
for no acknowledgement to your swift reply until now.

Okay, after taking your suggestion, I tried it on the command line I found
that it would upload, process the file and return the resulting data fine.
This then told me I was not going bonkers and it would work eventually.

After more trial and error I noticed one thing. If you use this line in the
PHP to initialise curl;

        $ch = curl_init( $url );

Then did all the other nifty stuff it would give me the segmentation fault.

If I did this (which I do now);

        $ch = curl_init();
        curl_setopt( $ch, CURLOPT_URL, $url );

It works wonderfully now. Yaay. No more segmentation faults either :)

Thanks for the tip, it was probably obvious to anybody else, however when
you are staring at the same problem for a couple of hours, you tend to spend
most of that time going around in circles.

Cheers,

Raoul Mackle

_______________________________________________________________

Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
Received on 2002-06-17