Doc #52581 [Opn]: "the connection closes" should be "curl handle is closed"

From: Date: Wed, 11 Aug 2010 10:28:33 +0000
Subject: Doc #52581 [Opn]: "the connection closes" should be "curl handle is closed"
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4840@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52581&edit=1 ID: 52581 User updated by: johan at qx dot se Reported by: johan at qx dot se Summary: "the connection closes" should be "curl handle is closed" Status: Open Type: Documentation Problem Package: Documentation problem Operating System: OS X (darwin 9.8.0) PHP Version: 5.3.3 Block user comment: N New Comment: bad copy pasting... The line # connection is not kept alive, i.e. it's closed. cookiejar file /tmp/cookiefile now exists should obviously end with file /tmp/cookiefile does not exist Previous Comments: ------------------------------------------------------------------------ [2010-08-11 11:52:42] johan at qx dot se 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 this bug report at http://bugs.php.net/bug.php?id=52581&edit=1

« previous php.doc.bugs (#4840) next »