[Solved] Unable to connect to your FTP server using the supplied hostname. |
[eluser]jurosik[/eluser]
Hi, I'm tryin' to set up ftp connection in my script, but there is some simple (for me unknown) problem. I am connecting via script from UserGuide: Code: $this->load->library('ftp'); and the error is: Unable to connect to your FTP server using the supplied hostname. Any idea? I tried many modifications of hostname from dreamweb.sk to ftp://www.dreamweb.sk and many more, but no one works...
[eluser]Matthew Lanham[/eluser]
Seems strange, have you tried setting passive to TRUE as maybe a firewall is blocking the communication
[eluser]jurosik[/eluser]
Yes I tried passive mode... still the same error, i don't know where could be problem... :question:
[eluser]sandwormusmc[/eluser]
Stupid question, but can you connect via another FTP client to the host from the box your code is running on?
[eluser]jurosik[/eluser]
to CI Lee: my username is [email protected], i tried it change to [email protected]@ftp.dreamweb.sk, but nothing changed, the same error... to sandwormusmc: yes, i am connecting via transmit FTP with same data and it works...
[eluser]Pygon[/eluser]
just a note.... in order to use FTP, your php must be compiled "--enable-ftp". You might consider testing whether you can actually use "ftp_connect" seperately from CI to make sure that isn't causing a problem.
[eluser]jurosik[/eluser]
Thank you for your time guys, problem is with my hosting provider, the hostname should be set to 127.0.0.1... now it works
[eluser]sandwormusmc[/eluser]
That makes sense. Your code was connecting to the box it was actually running on, not an external one ... so 'localhost' or 127.0.0.1 would have worked. |
Welcome Guest, Not a member yet? Register Sign In |