Jump to content


Photo

Warning ftp_put()


  • Please log in to reply
No replies to this topic

#1 FGB

FGB
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 20 October 2006 - 03:24 PM

I have a script that uploads files via FTP and its returning the following warning, out of the blue, since yesterday:

Warning: ftp_put() [function.ftp-put]: Accepted data connection in public_html/sys/laudos_xupload.php on line 90

The function:

function enviar($file, $sufix, $ref, $path){
        // Upload function . . . 
        include('ftpsets.php');
        // set up basic connection
        if(!isset($conn_id)){
            $conn_id = ftp_connect($ftp_server);
            // login with username and password
            $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
            // turn passive mode on
            ftp_pasv($conn_id, true);
        }
        $remote_name = $ref.'.'.$sufix;
        $remote_file = $remote_name;
        set_time_limit(120);
        // upload a file
        if (!ftp_put($conn_id, $remote_file, $file['tmp_name'],FTP_BINARY)) 
die("<HR>Ocorreu um Erro: O arquivo não foi enviado!");
    }//EOF

Any help at all its appreciate, since ive read all documentations and forums around and havnet got a clue....




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users