Test: /ext/ftp/tests/bug39583.phpt - Version 5.6.40-dev        

Bug #39583 FTP function always transfers in binary mode
Submitted: 2006-11-22 10:29:31 Modified: 2006-11-24 12:40:44
From: ts.serveroperations Assigned:
Status: Closed Package: FTP related
PHP Version: 4.4.4 OS: Redhat Enterprise ES version 4

There is 1 diff reported by users for this test.

Count Diff
3 (100%)
002+
002- Uploaded %sbug39583.php as bug39583.php
003+ Warning: file_get_contents(nm2.php): failed to open stream: No such file or directory in /usr/src/apache/php-src/debian/build-tree/php56/ext/ftp/tests/server.inc on line 257
004+ bool(false)
005+ string(529) "<?php
006+ $bug39583=1;
007+ require 'server.inc';
008+
009+ $ftp = ftp_connect('127.0.0.1', $port);
010+ if (!$ftp) die("Couldn't connect to the server");
011+
012+ var_dump(ftp_login($ftp, 'user', 'pass'));
013+
014+ $source_file = __FILE__;
015+ $destination_file = basename(__FILE__);
016+
017+ // upload the file
018+ $upload = ftp_put($ftp, $destination_file, $source_file, FTP_ASCII);
019+
020+ // check upload status
021+ if (!$upload) {
022+ echo "FTP upload has failed!";
023+ } else {
024+ echo "Uploaded $source_file as $destination_file";
025+ }
026+
027+ // close the FTP stream
028+ ftp_close($ftp);
029+ ?>
030+ "
031+
032+ Warning: ftp_put(): Requested file action aborted. in %s/bug39583.php on line 14
033+ FTP upload has failed!