php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #39637 Add more curl_setopt options
Submitted: 2006-11-26 16:22 UTC Modified: 2009-05-04 14:21 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:5 (100.0%)
Same OS:5 (100.0%)
From: apinstein at mac dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 5.2.0 OS: all
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: apinstein at mac dot com
New email:
PHP Version: OS:

 

 [2006-11-26 16:22 UTC] apinstein at mac dot com
Description:
------------
PHP's curl_setopt is missing many options available in 
libcurl.

Reproduce code:
---------------
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FTP_USE_EPSV, false);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt($ch, 138 /* CURLOPT_FTP_FILEMETHOD */, 3 /* CURLFTPMETHOD_SINGLECWD */); // not supported yet; integers don't work
$localFH = fopen($localCopyPath, 'w+');
curl_setopt($ch, CURLOPT_FILE, $localFH);
$ok = curl_exec($ch);
curl_close($ch);


Expected result:
----------------
I would expect that the curl extension would keep more up-
to-date with the curl options.

man curl_easy_setopt

will show all available curl options.

Alternatively, it'd be nice if there were a curl_easy_setopt
() function in php so that one could use options even if 
they were not "supported" in php. At present, even passing 
the correct integer values to curl_setopt() will not do 
anything since the php curl extension only accepts defined 
options.

In particular, I need the following options:

option: CURLOPT_FTP_FILEMETHOD
values: CURLFTPMETHOD_MULTICWD, CURLFTPMETHOD_NOCWD, 
CURLFTPMETHOD_SINGLECWD


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-04 14:21 UTC] pajoye@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

5.3+
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Sep 15 07:01:27 2024 UTC