Visualizzazione dei risultati da 1 a 2 su 2

Discussione: errore con ftp_put

  1. #1

    errore con ftp_put

    Sto cercando di spostare un file da un server ad un altro con le funzioni ftp ma ottengo questo errore:

    Warning: ftp_put() [function.ftp-put]: Opening BINARY mode data connection for n.jpg. in /var/www/vhosts/clar.it/httpdocs/php/ftp2.php on line 29

    il file n.png è presente nella cartella da cui io cerco di copiarlo, il collegamento ftp verso il server su cui andrà copiato il file è aperto correttamente. Sapete darmi qualche dritta? Grazie

  2. #2
    Puoi provare con questo suggerimento (trovato sul manuale ufficiale usando il tuo errore come chiave di ricerca su google):

    If when using ftp_put you get the one of the following errors:

    Warning: ftp_put() [function.ftp-put]: Opening ASCII mode data connection

    Warning: ftp_put() [function.ftp-put]: Opening BINARY mode data connection

    and it creates the file in the correct location but is a 0kb file and all FTP commands thereafter fail. It is likely that the client is behind a firewall. To rectify this use:

    <?php
    ftp_pasv($resource, true);
    ?>

    Before executing any put commands. Took me so long to figure this out I actually cheered when I did
    http://www.php.net/manual/en/function.ftp-put.php#90518

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.