cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Moving files on an FTP server via libcurl

From: Vipin hegde <vipinhegde_at_gmail.com>
Date: Fri, 29 Jun 2007 14:44:22 -0700

Here's the protocol trace where, as i mentioned in my last email, i see the
"Curl_xxx_rcvs returned -1, block = TRUE"

==================================================================================================================
* About to connect() to ftp.example.com port 21
* Trying 1.2.3.4... * connected
* Connected to ftp.example.com (1.2.3.4) port 21
< 220-ftp.example.com FTP Server ready....
< 220 -
> AUTH SSL
< 234 AUTH command OK. Initializing SSL connection.
* successfully set certificate verify locations:
* CAfile: /usr/local/apache2/php/share/curl/curl-ca-bundle.crt
  CApath: none
* SSL connection using IDEA-CBC-SHA
* Server certificate:
* subject: /CN=ftp.corp225.example.com/L=dallas/ST=WI/O=example
Corporation/C=US/emailAddress=test_at_example.com/OU=CIT
* start date: 2004-01-01 12:22:12 GMT
* expire date: 2054-01-01 17:22:12 GMT
* issuer: /CN=ftp.corp225.example.com/L=dallas/ST=WI/O=example
Corporation/C=US/emailAddress=test_at_example.com/OU=CIT
* SSL certificate verify result: error number 1 (18), continuing anyway.
> USER testuser
< 331 User name okay, need password.
> PASS testpwd
< 230 User logged in, proceed.
> PBSZ 0
< 200 PBSZ command OK. Protection buffer size set to 0.
> PROT P
< 200 PROT command OK. Using private data connection.
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> CWD outbound
< 250 Directory changed to /outbound
> CWD old
< 250 Directory changed to /outbound/old
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (208,255,13,121,15,167)
* Trying 1.2.3.4... * connected
* Connecting to 1.2.3.4 (1.2.3.4) port 4007
> TYPE A
< 200 Type set to A.
> LIST
< 150 Opening ASCII mode data connection for /bin/ls.
* Doing the SSL/TLS handshake on the data stream
* successfully set certificate verify locations:
* CAfile: /usr/local/apache2/php/share/curl/curl-ca-bundle.crt
  CApath: none
* SSL re-using session ID
* SSL connection using IDEA-CBC-SHA
* Server certificate:
* subject: /CN=ftp.corp225.example.com/L=dallas/ST=WI/O=example
Corporation/C=US/emailAddress=test_at_example.com/OU=CIT
* start date: 2004-01-01 12:22:12 GMT
* expire date: 2054-01-01 12:22:12 GMT
* issuer: /CN=ftp.corp225.example.com/L=dallas/ST=WI/O=example
Corporation/C=US/emailAddress=test_at_example.com/OU=CIT
* SSL certificate verify result: error number 1 (18), continuing anyway.
* Curl_xxx_rcvs returned -1, block = TRUE
* Remembering we are in dir outbound/old/
< 226 Transfer complete.
* Connection #0 to host ftp.example.com left intact
> QUIT
< 221 Goodbye!
* Closing connection #0

==================================================================================================================

Regards,
Vipin

On 6/29/07, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> On Thu, 28 Jun 2007, Vipin hegde wrote:
>
> > I split the command in two, as Daniel pointed out. Still no luck. I
> have
> > the verbose flag turned on and I see no error message or warning which
> > might give a clue as to why the files are not being moved over.
>
> [...]
>
> > curl_setopt($cobj, CUROPT_POSTQUOTE, array("RNFR $filename"));
> > curl_setopt($cobj, CUROPT_POSTQUOTE, array("RNTO
> old_datafiles/$filename"));
>
> No, you set the same option twice which won't work.
>
> With the verbose option set, you should see a complete "protocol trace"
> and in
> there you will of course see the "quote" commands you send to the server.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
>

-- 
Regards,
Vipin

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-06-29