ID: 41352
Updated by: [EMAIL PROTECTED]
Reported By: guy dot vleugels at kaneka dot be
-Status: Open
+Status: Feedback
Bug Type: FTP related
Operating System: RH9
PHP Version: 5.2.2
New Comment:
Where can we reproduce it?
Previous Comments:
------------------------------------------------------------------------
[2007-05-10 13:06:26] guy dot vleugels at kaneka dot be
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 this bug report at http://bugs.php.net/?id=41352&edit=1