Our customers run our php program on their own server. Some are Linux, some are Windows. To update the program I use ftp. Recently I’ve changed the FTP server, i.e. the physical machine running the server.
Now some of our customers experience troubles if they want to update. If they execute a testskript they get following message:
Warning: ftp_get() [function.ftp-get]: Opening BINARY mode data connection for _testupdate.txt (68 bytes). in C:\Programme\Zend\Apache2\htdocs_testupdate.php on line 65
I’ve tried to download the file via passive and active mode and also with ASCII and BINARY mode… . But nothing changes. Here is the code:
echo "<br> Testfilegröße wurde richtig ermittelt.";
$bstat = ftp_get ( $conn_id, "_testupdate.txt", "_testupdate.txt", FTP_BINARY); #FTP_ASCII oder FTP_BINARY
$exists = file_exists("_testupdate.txt");
At first I thought that the firewall could cause the problem, but this seems unlikely, because the testscript can connect and login to the ftp server
Has somebody an idea what I can try to solve the problem?
Try this:
Helps if a firewall is indeed the culprit.
Otherwise, make sure your file is indeed binary or ASCII. This error would be thrown in the wrong case.