ftp_get problems[solved]


I have a little script which uses ftp to connect to a server and downloads a file. This was originally written on Fedora 7 box using php 5.2.4 and was working fine. I moved the script to another computer with the same configuration (fedora,php 5.2.4) and now it will not work.

Specifically, I am getting the warning:

ftp_get(): Can’t build data connection: No route to host. in /home/waylon/project/cronjob/get_info.php on line 34

I have no idea what is going on here. I find it strange that I am able to log on to the server fine, then it crashes when I try to get a file. I can even successfully use the ftp_size() command to get the size of the file I am trying to download. I am able to ftp into the site via the command line, and grab the file fine, so I am thinking it is something with my php configuration. FTP is enabled and my phpinfo() page looks identical to the working machines page as far as anything FTP is concerned.

Does anyone have any ideas of what could be wrong?


Nevermind, Turns out it was a problem with my system. Strange that I could use ftp fine from the command line though…

Sponsor our Newsletter | Privacy Policy | Terms of Service