Edit report at https://bugs.php.net/bug.php?id=63766&edit=1
ID: 63766
User updated by: mattsch at gmail dot com
Reported by: mattsch at gmail dot com
Summary: sftp upload CURLOPT_URL errors with code 79 with
directory path
Status: Open
Type: Bug
Package: cURL related
Operating System: Gentoo
PHP Version: 5.4.9
Block user comment: N
Private report: N
New Comment:
Could you elaborate as to why this would be a bad url? The documentation on
the curl website seems to indicate that you can specify a url without a
filename at the end but then the examples are not specific to upload:
http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTURL
Previous Comments:
------------------------------------------------------------------------
[2012-12-17 12:17:00] [email protected]
This is not a libcurl bug. If you think about it for a while, libcurl doesn't
know the 'foo' name, it is only given the (bad) URL and it cannot but to fail
in
this case.
I'm also convinced you can see the same problem with other protocols than SFTP
for the same reason.
------------------------------------------------------------------------
[2012-12-17 01:23:46] [email protected]
Reopened per previous comments, although I wonder if this might be a libcurl
issue rather than a PHP one.
------------------------------------------------------------------------
[2012-12-14 22:50:27] mattsch at gmail dot com
"foo" designates a file and not a directory. Perhaps my test script should
have been more clear by using a file extension like .txt or something. The
file I am trying to upload is being uploaded to a directory that already exists
on the remote server.
------------------------------------------------------------------------
[2012-12-14 22:47:01] mattsch at gmail dot com
This is a bug. I am not trying to upload anything recursively. I am simply
trying to upload one file to a directory. When I don't specify the target
filename on the url, I expect that the target file created on the remote server
is the same name as the filename that I am uploading.
------------------------------------------------------------------------
[2012-12-14 08:39:20] [email protected]
CURL cannot upload directory (aka recursively).
However it can create missing directories in a path if necessary using the
create
dir option.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=63766
--
Edit this bug report at https://bugs.php.net/bug.php?id=63766&edit=1