Categories
PHP

PHP FTP Error – PORT Command Successful

If your PHP script that FTPs files starts failing with an error like this:

PHP Warning:  ftp_put() [function.ftp-put]: PORT command successful

Try using pasv mode.

<?php
$con = ftp_connect(ftp.example.com);
//...
ftp_pasv($con, true);
?>