Dweezel Posted May 12, 2013 Share Posted May 12, 2013 Hi guys I'm not sure this is a PHP coding problem but it may be so I'm posting here anyway. I've got a script that runs as a cron job every few minutes that uses ftp_get() to pull a file from another server. I set this up in 2011 and it's been working flawlessly until a few days ago. I've just TeamViewered in to the remote computer where the files are being pulled from and had a look at the Filezilla FTP log. It's showing the successful FTP connection with the script but is then throwing a "425, Can't Open Data Connection" error. I've just opened Dreamweaver and used exactly the same settings (remote address, user name, password etc.) and I was able to successful select and pull the file down via FTP. I checked the Filezilla log and transfer was successful with no 425 errors. Here's the code in my script. It's very simple: $c = ftp_connect('www.remotesite.com') or die("Can't connect"); ftp_login($c,'username','password') or die("Can't login"); ftp_get($c, $local_filelocation,$remote_filelocation, FTP_ASCII); Quote Link to comment https://forums.phpfreaks.com/topic/277927-ftp_get-stopped-working-cant-work-out-why/ Share on other sites More sharing options...
Dweezel Posted May 12, 2013 Author Share Posted May 12, 2013 For some reason the text I typed below the code block in the above post didn't show up. Here it is: So I can succesfully get the file via FTP using an FTP client but the above script has suddenly started giving me the 425 errors on the FTP server. Does anyone have any ideas as to why this may be happening? Any help much appreciated. TIA, Chris Quote Link to comment https://forums.phpfreaks.com/topic/277927-ftp_get-stopped-working-cant-work-out-why/#findComment-1429709 Share on other sites More sharing options...
Dweezel Posted May 13, 2013 Author Share Posted May 13, 2013 I Still haven't been able to solve this one. Does anyone have any ideas? Thanks, Chris Quote Link to comment https://forums.phpfreaks.com/topic/277927-ftp_get-stopped-working-cant-work-out-why/#findComment-1429801 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.