#41598 [NEW]: Code example for curl_multi_exec doesn't work
| From: | andrew dot minerd at sellingsource dot com | Date: | Tue, 05 Jun 2007 15:18:18 +0000 |
| Subject: | #41598 [NEW]: Code example for curl_multi_exec doesn't work | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969376549@lists.php.net to get a copy of this message | ||
From: andrew dot minerd at sellingsource dot com
Operating system:
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: Code example for curl_multi_exec doesn't work
Description:
------------
The documentation for curl_multi_exec includes a code example that doesn't
work: it uses undeclared curl handles ($ch rather than $ch1 or $ch2), only
calls curl_multi_exec once (which doesn't complete the transfer), and
doesn't have enough parameters for the curl_multi_exec call.
Reproduce code:
---------------
See http://php.net/curl_multi_exec
Expected result:
----------------
The contents of http://www.example.com (if it existed) and
http://www.php.net will be downloaded and displayed.
Actual result:
--------------
Notice: Undefined variable: ch in /home/andrewm/test-curl-orig.php on line
7
Warning: curl_setopt(): supplied argument is not a valid cURL handle
resource in /home/andrewm/test-curl-orig.php on line 7
Notice: Undefined variable: ch in /home/andrewm/test-curl-orig.php on line
8
Warning: curl_setopt(): supplied argument is not a valid cURL handle
resource in /home/andrewm/test-curl-orig.php on line 8
Notice: Undefined variable: ch in /home/andrewm/test-curl-orig.php on line
9
Warning: curl_setopt(): supplied argument is not a valid cURL handle
resource in /home/andrewm/test-curl-orig.php on line 9
Notice: Undefined variable: ch in /home/andrewm/test-curl-orig.php on line
10
Warning: curl_setopt(): supplied argument is not a valid cURL handle
resource in /home/andrewm/test-curl-orig.php on line 10
Warning: curl_multi_exec() expects exactly 2 parameters, 1 given in
/home/andrewm/test-curl-orig.php on line 20
Warning: curl_multi_close() expects exactly 1 parameter, 0 given in
/home/andrewm/test-curl-orig.php on line 23
--
Edit bug report at http://bugs.php.net/?id=41598&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41598&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41598&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41598&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41598&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41598&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41598&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41598&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41598&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41598&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41598&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41598&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41598&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41598&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41598&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41598&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41598&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41598&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41598&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41598&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41598&r=mysqlcfg