RE: FTPS transfers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Jason Petersen [mailto:fuzzybad@xxxxxxxxx]
> Sent: Monday, September 26, 2005 1:15 PM
> To: php-general@xxxxxxxxxxxxx
> Subject:  FTPS transfers
> 
> 
> Hello List,
> 
> I'm having some issues with PHP's FTPS support. I'm using 
> ftp_ssl_connect()
> to establish a connection (which is successful), however I am 
> unable to
> retrieve a directory listing or upload files. Does anyone 
> have advice for
> getting this to work? The uploaded file is created with a 
> filesize of zero.
> 
> My code looks something like this:
> 
> $conn = ftp_ssl_connect($FTP['host']);
> $result = ftp_login($conn, $FTP['user'], $FTP['pass']);
> 
> $file = 'test.txt';
> $fp = fopen($file, 'r');
> 
> ftp_fput($conn, $file, $fp, FTP_ASCII)
> 
> fclose($fp);
> ftp_close($conn);

Jason,

Try adding 

ftp_pasv ( $conn, true );

JM

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux