php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47636 Warning: ftp_put(....): failed to open stream "File too large"
Submitted: 2009-03-12 16:24 UTC Modified: 2009-03-13 13:27 UTC
From: password12345 at inwind dot it Assigned:
Status: Not a bug Package: FTP related
PHP Version: 5.2.9 OS: Debian
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: password12345 at inwind dot it
New email:
PHP Version: OS:

 

 [2009-03-12 16:24 UTC] password12345 at inwind dot it
Description:
------------
The file size is 2G.

Reproduce code:
---------------
$t=ftp_connect($ftp_server);

Echo "Logging...\n";
$ft=ftp_login($t,$ftp_user,$ftp_pass);
if (( !$t) || (!$ft)) {
  echo "La connessione FTP ? fallita a $ftp_server per l'utente $ftp_user\n";
  die;
} else
  echo "Connesso a $ftp_server con utente $ftp_user\n";

ftp_chdir($t,"/$pathremote/bk".$act);
echo "/$pathremote/bk".$act."\n";
ftp_mkdir($t,"$name");
ftp_chdir($t,"$name");
if ($dir = @opendir("../ftp")) {
  echo "Transfer $dir\n";
  while ( ($file=readdir($dir))!==false ) {
    if (!is_file("$path/$file") ) continue;
    $trans++;
    if (!ftp_put($t,$file,"$path/$file",FTP_BINARY))
      echo "\nErrore put ftp file: $path/$file to /$pathremote/bk$act/$name/\n\n";
//    die("\nErrore ftp!\n\n");
    else {
        echo "Puting file: $path/$file to /$pathremote/bk$act/$name/\n";
        exec("rm -f $path/$file");
    }
  }
  closedir($dir);
}




Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-13 13:27 UTC] jani@php.net
Obviously the target FS can not handle files that large. That's not a 
PHP bug.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 10:01:33 2025 UTC