Doc #52581 [NEW]: "the connection closes" should be "curl handle is closed"
| From: | johan at qx dot se | Date: | Wed, 11 Aug 2010 09:52:43 +0000 |
| Subject: | Doc #52581 [NEW]: "the connection closes" should be "curl handle is closed" | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-4839@lists.php.net to get a copy of this message | ||
From:
Operating system: OS X (darwin 9.8.0)
PHP version: 5.3.3
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:"the connection closes" should be "curl handle is closed"
Description:
------------
Documentation at http://se2.php.net/manual/en/function.curl-setopt.php
states
"CURLOPT_COOKIEJAR The name of a file to save all internal cookies to
when the connection closes."
However, the cookiejar file is created when the curl HANDLE is closed, not
when a connection is closed.
I suggest a change in the documentation to
""CURLOPT_COOKIEJAR The name of a file to save all internal cookies to
when the handle is closed, e.g. after a call to curl_close."
Test script:
---------------
$c = curl_init('http://example.com');
curl_setopt ($c, CURLOPT_COOKIEJAR, '/tmp/cookiefile');
for ($i = 0; $i < 3; ++$i) {
$r[] = curl_exec($c) . PHP_EOL;
# connection is not kept alive, i.e. it's closed. cookiejar file
/tmp/cookiefile now exists
file_get_contents('/tmp/cookiefile'); # error!
}
curl_close($c);
# cookiejar file /tmp/cookiefile now exists
file_get_contents('/tmp/cookiefile'); # ok
--
Edit bug report at http://bugs.php.net/bug.php?id=52581&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52581&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52581&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52581&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52581&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52581&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52581&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52581&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52581&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52581&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52581&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52581&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52581&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52581&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52581&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52581&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52581&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52581&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52581&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52581&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52581&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52581&r=mysqlcfg