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

curl-and-php

cant get curl_setopt & CURLOPT_STDERR to work

From: Kevin Lowe <klowe_at_solomon.ie>
Date: Fri, 30 May 2003 14:13:17 +0100

Hi,

I'm having a problem getting CURLOPT_STDERR to work.

Firstly from the command line,

exec("curl --stderr error.log -d @file.xml -H \"Content-Type: text/xml\"
$URL",$return, $stat);

This writes either an error to error.log or a status report if all goes
well.

However this code just keeps writing a zero bytes error.log regardless of
success of failure (only showing relevent statements here),

$error_FH = fopen("error.log","w");
curl_setopt ($ch,CURLOPT_STDERR, $error_FH );
fclose($error_FH);

I'm usung PHP 4.2.2/libcurl 7.9.8 on FreeBSD 4.6 and curl_error ($ch) &
curl_errno ($ch) return the expected results.

 Many thanks,

 Kevin

-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
Received on 2003-05-30