From: blueness at gentoo dot org Operating system: Linux PHP version: 5.4.9 Package: cURL related Bug Type: Bug Bug description:url-7.28.1 breaks PHP curl_getinfo and curl_multi_getcontent
Description: ------------ When php 5.4.9 is built against curl-7.28.1, curl_multi_getcontent($stuff) does not return the full content of the web page but truncates some characters from the beginning. See the following downstream bugs for more details: https://sourceforge.net/p/curl/bugs/1172/ https://bugs.gentoo.org/show_bug.cgi?id=444788 In the gentoo bug, please look at comment #14 since it pin points the curl commit that deprecated CURLOPT_SSL_VERIFYHOST=1 and led to the breakage in php. Test script: --------------- <?php $cm = curl_multi_init(); $stuffs = curl_init(); $curl_options = array( CURLOPT_URL => 'http://www.google.ca', CURLOPT_RETURNTRANSFER => 1, CURLOPT_SSL_VERIFYHOST => 0, // these are the problem CURLOPT_SSL_VERIFYPEER => 0, // toggle 0/1 to test CURLOPT_HEADER => 1 ); curl_setopt_array($stuffs, $curl_options); curl_multi_add_handle($cm, $stuffs); do { curl_multi_exec($cm, $running); } while($running > 0); $content = curl_multi_getcontent($stuffs); $info = curl_getinfo($stuffs); curl_multi_remove_handle($cm, $stuffs); curl_multi_close($cm); print_r($info); // cuts off too much, the header size is incorrect echo mb_substr($content, $info['header_size']); ?> Expected result: ---------------- For the expected and actual results, please see https://bugs.gentoo.org/show_bug.cgi?id=444788 comments #10-13 -- Edit bug report at https://bugs.php.net/bug.php?id=63795&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63795&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63795&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63795&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63795&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=63795&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63795&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63795&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63795&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63795&r=support Expected behavior: https://bugs.php.net/fix.php?id=63795&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63795&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63795&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63795&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63795&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63795&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63795&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63795&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63795&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63795&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63795&r=mysqlcfg