From: jon at feburman dot co dot uk Operating system: Redhat 5 PHP version: 5.2.11 PHP Bug Type: cURL related Bug description: Curl post upload functions changed
Description: ------------ Files being uploaded via http post come across with a url encoded version of the whole file path rather than just the name part as it did in older versions of PHP. Reproduce code: --------------- function upload($dir, $file, $userpass) { if( ! $this->cURLcheckBasicFunctions() ) return false; $ch = curl_init(); if($ch) { $data = array('dir' => $dir, 'filedata0' => "@$file"); if( !curl_setopt($ch, CURLOPT_RETURNTRANSFER, true) ) return false; if( !curl_setopt($ch, CURLOPT_URL, $this->url)) return false; if( !curl_setopt($ch, CURLOPT_USERPWD, $userpass)) return false; if( !curl_setopt($ch, CURLOPT_POST, 1)) return false; if( !curl_setopt($ch, CURLOPT_POSTFIELDS, $data)) return false; if( !curl_exec($ch) ) return false; curl_close($ch); return true; } else return false; } Expected result: ---------------- File arrives on remote server called "SAV2906_A4L_4pp_D_shipping_label.pdf" Actual result: -------------- File arrives on remote server called ":2Fvar:2Fwww:2Fvhosts:2Ffeburman.co.uk:2Fhttpdocs:2Fsprint:2Fjobs:2Fjob 2906:2FSAV2906_A4L_4pp_D_shipping_label.pdf" -- Edit bug report at http://bugs.php.net/?id=49921&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49921&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49921&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49921&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49921&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49921&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49921&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49921&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49921&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49921&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49921&r=support Expected behavior: http://bugs.php.net/fix.php?id=49921&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49921&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49921&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49921&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49921&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49921&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49921&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49921&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49921&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49921&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49921&r=mysqlcfg