Jump to content

Recommended Posts

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);
 
 

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.