#41352 [NEW]: Warning: ftp_get() PORT command successful

From: Date: Thu, 10 May 2007 13:06:26 +0000
Subject: #41352 [NEW]: Warning: ftp_get() PORT command successful
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-112470@lists.php.net to get a copy of this message
From:             guy dot vleugels at kaneka dot be
Operating system: RH9
PHP version:      5.2.2
PHP Bug Type:     FTP related
Bug description:  Warning: ftp_get() PORT command successful

Description:
------------
After upgrading to PHP 5.2.2 on my RH9-machine the following error warning
occurs on post-script files using ftp_get:

Warning: ftp_get() [function.ftp-get]: PORT command successful

As a result, the post-script file won't be downloaded to my machine.

If I do a downgrade to < PHP5.2.2, everything works perfectly.

Reproduce code:
---------------
	$ftpcnn = ftp_connect("ftp-server", "4559");
	
	// login with username and password
	$ftprs = ftp_login($ftpcnn, "user", "passwd");
	
	// check connection
	if( (!$ftpcnn) || (!$ftprs) )
	{
		echo "FTP connection has failed!<br />";
		exit;
	}
	
	
	// Firstly download txt-file
	ftp_get( $ftpcnn, "/mydir/txtfile", "/ftpdir/txtfileonftp", FTP_BINARY
);
	
	// ---- Do some extra stuff -----------------------
	// Get the name of the postscript-file
	$lines = file( "mydir/txtfile" );

	foreach( $lines as $line )
	{
		if( strstr($line, "!postscript") !== FALSE )	// ea. $line =
"!postscript:0::docq/doc1764.ps"
		{
			$temp = explode( ":", $line );
			
			$psfile = $temp[3];
		}
	}
	// --- End some extra stuff -------------------


	// Code which causes the warning:
	// Warning: ftp_get() [function.ftp-get]: PORT command successful.

	// Download the ps file
	ftp_get( $ftpcnn, "/mydir/psfile", $psfile, FTP_BINARY ); 
	
	// close the connection
	ftp_close( $ftpcnn );

Expected result:
----------------
// Downloading of a file specified by arguments in ftp_get()

Actual result:
--------------
Warning: ftp_get() [function.ftp-get]: PORT command successful

File won't be downloaded

-- 
Edit bug report at http://bugs.php.net/?id=41352&edit=1
-- 
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41352&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41352&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41352&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41352&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=41352&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41352&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41352&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41352&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41352&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41352&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=41352&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=41352&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41352&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41352&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41352&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41352&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41352&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41352&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41352&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41352&r=mysqlcfg


Thread (10 messages)

« previous php.bugs (#112470) next »