php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #52581 "the connection closes" should be "curl handle is closed"
Submitted: 2010-08-11 11:52 UTC Modified: 2010-09-20 13:07 UTC
From: johan at qx dot se Assigned: markskilbeck (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.3.3 OS: OS X (darwin 9.8.0)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: johan at qx dot se
New email:
PHP Version: OS:

 

 [2010-08-11 11:52 UTC] 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



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-11 12:28 UTC] johan at qx dot se
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
 [2010-09-20 13:07 UTC] markskilbeck@php.net
Automatic comment from SVN on behalf of markskilbeck
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=303617
Log: #52581
 [2010-09-20 13:07 UTC] markskilbeck@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: markskilbeck
 [2010-09-20 13:07 UTC] markskilbeck@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 16 12:01:32 2024 UTC