From:             sdteffen at gmail dot com
Operating system: SuSE Linux 10.2
PHP version:      5CVS-2007-06-16 (CVS)
PHP Bug Type:     cURL related
Bug description:  [PATCH] Add CURL Progress Function Callback

Description:
------------
The current PHP version does not allow to use the CURL progress
function callback (CURL_PROGRESSFUNCTION).

Reproduce code:
---------------
<?php
$ch = curl_init("http://www.php.net";);
$fp = fopen("index.html", "w");

function curl_progress_callback($a=0,$b=0,$c=0, $d=0) {
        echo "curl_progress_callback($a,$b,$c,$d)\n";
}

curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_NOPROGRESS, false);
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, 'curl_progress_callback');
curl_exec($ch);
echo curl_close($ch);
fclose($fp);
?>

Expected result:
----------------
curl_progress_callback(0,1054,0,0)
curl_progress_callback(0,35131,0,0)


Actual result:
--------------
  % Total    % Received % Xferd  Average Speed   Time    Time     Time 
Current
                                 Dload  Upload   Total   Spent    Left 
Speed
100 35131    0 35131    0     0  32344      0 --:--:--  0:00:01 --:--:--
52105

-- 
Edit bug report at http://bugs.php.net/?id=41712&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41712&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41712&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41712&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41712&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=41712&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41712&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41712&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41712&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41712&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41712&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=41712&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=41712&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41712&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41712&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41712&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41712&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41712&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41712&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41712&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41712&r=mysqlcfg

Reply via email to