Welcome Guest, Not a member yet? Register   Sign In
FTP -> Mirror & Upload... killing me :0
#1

[eluser]visormatt[/eluser]
So I am using the FTP mkdir() and everything is working great... But when trying to use the mirror or upload functions I am having ZERO success....


my code is as follows...

$this->ftp->connect(); // config settings are saved in a separate file & working
$this->ftp->mirror('/Users/mshelley/Desktop/swf/', '/pathtomyfolder/html/Client/job/swf/'); // Directories do exist and are 0777

I am on a mac and as far as I can tell everything should be working, any ideas or suggestions would be appreciated... Also I do know my remote paths are correct from using the

$list = $this->ftp->list_files('/pathtomyfolder/html/Client/job/swf/');
print_r($list);
#2

[eluser]Jamie Rumbelow[/eluser]
Hi visormatt,

What errors are you having? What's not working?

Jamie
#3

[eluser]visormatt[/eluser]
It is not giving me any errors, when i look into the remote directory there are no files, and the time it takes to process the list_files() not only very quick but the list shows the files have not been uploaded or mirrored.
#4

[eluser]visormatt[/eluser]
Jamie,

Well I am really hoping that I have resolved the issue... I think it could just be a connectivity error based on our Firewall settings. So hopefully this is the case, but unfortunately I will not be sure until our IT team is able to add an additional exception on a port. But I am still not certain this is the issue as the FTP class is still able to use the MKDIR() and LIST_FILES() functions, if that makes sense....

Until then, any ideas are always appreciated.
#5

[eluser]Jamie Rumbelow[/eluser]
Well this library has worked for me in the past, so it must be an issue with your application or PHP install. Still, let me know if it was a firewall issue.

Jamie
#6

[eluser]jedd[/eluser]
[quote author="visormatt" date="1257571985"]
I think it could just be a connectivity error based on our Firewall settings.
[/quote]

FTP has always been challenged by traversing firewalls, especially NAT'ing ones.

Quote: So hopefully this is the case, but unfortunately I will not be sure until our IT team is able to add an additional exception on a port. But I am still not certain this is the issue as the FTP class is still able to use the MKDIR() and LIST_FILES() functions, if that makes sense....

FTP uses two ports (generally) - one for command, one for data. This is why it's challenging. It also goes some way to explaining why command actions work, but data transfers do not.

You can force it down one port (kinda sorta) by insisting on PASSIVE mode - not sure how you do that here, but look for that word or the string PASV in the docs.

But you should really look at superior alternatives - scp (ssh secure copy) is the preferred approach. Secure, traverses firewalls with ease (single port for starters), well documented, installed pretty much everywhere, etc.




Theme © iAndrew 2016 - Forum software by © MyBB