ftp_connect to localhost

A

Anonymous

Guest
Hello!

I have a big problem and I can't find a solution. I use ftp_connect on localhost (I'm running an FTP server) and it can't connect (timed out). Interesting is, that I can connect to this server by Total Commander, but not with PHP. And I also can connect to other servers by PHP's ftp_connect. I think it is a very stupid problem, but I have no idea WT* can it be.

Thanks.
 
t0m@s said:
Hello!

I have a big problem and I can't find a solution. I use ftp_connect on localhost (I'm running an FTP server) and it can't connect (timed out). Interesting is, that I can connect to this server by Total Commander, but not with PHP. And I also can connect to other servers by PHP's ftp_connect. I think it is a very stupid problem, but I have no idea WT* can it be.

Thanks.
First check name of server, ftp://localhost and ftp.localhost is't different things
Second check what port used, default 21, If you are use other set in second parametr of ftp_connect.
 
Hi!

I've solved the problem. I use 127.0.0.1 instead of localhost and it works. I don't know why, but it works!!!
 
t0m@s said:
Hi!

I've solved the problem. I use 127.0.0.1 instead of localhost and it works. I don't know why, but it works!!!
see the ftp server config.
 
Back
Top