ID:               41352
 User updated by:  guy dot vleugels at kaneka dot be
 Reported By:      guy dot vleugels at kaneka dot be
-Status:           Feedback
+Status:           Open
 Bug Type:         FTP related
 Operating System: RH9
 PHP Version:      5.2.2
 New Comment:

To be honest, there is no real location to reproduce this possible bug,
because the website is only on our companie's intranet.


Previous Comments:
------------------------------------------------------------------------

[2007-05-10 20:13:52] [EMAIL PROTECTED]

Where can we reproduce it?

------------------------------------------------------------------------

[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

Reply via email to