| 2:53 am on Dec 13, 2008 (gmt 0)|
Perhaps you need username and password for that server?
| 12:31 am on Dec 18, 2008 (gmt 0)|
Thanks. I tried the following without success.
error_reporting(E_ALL & ~E_NOTICE);
$ftp_login = 'login';
$ftp_password = 'password';
$conn_id = ftp_connect("ftp.mysite.com",21)or die ("Can't connect to FTP Server");
$login_result = ftp_login($conn_id, $ftp_login, $ftp_password)or die ("Can't login to FTP Server");
I have tried "firewall.mysite.com also without success. can not get past the ftp_connect() command. It keeps going to the die command.
| 7:03 am on Dec 18, 2008 (gmt 0)|
did u check time out for the FTP server?
| 7:43 pm on Dec 18, 2008 (gmt 0)|
No I haven't checked time out. I'm still a little green when it come to PHP and Servers, how might I check this? I host my site using a 3rd party.
| 2:46 pm on Dec 29, 2008 (gmt 0)|
I am having same issues, I'm running some PHP code to remotely connect (FTP) to another 3rd party webhosting company. I also get failed to connect every time with code very similar to yours. I'm still working on it and when I get it figured out, I'll post results here. Please do the same!
|CWI Tech Guy|
| 9:42 am on Jan 7, 2009 (gmt 0)|
Please contact your host and ask them if they have a firewall that may be preventing you from connecting to port 21 within the server. They may need to open this on an individual basis.
| 3:53 pm on Jan 14, 2009 (gmt 0)|
Thanks CWI Tech Guy. On the last response from my hosting company, they admitted not knowing web design or coding. I emailed them regarding access through the Firewall as you suggested, we will see what they say.
| 4:21 pm on Jan 14, 2009 (gmt 0)|
I had the same issue with Yahoo hosting a clients website, turns out Yahoo specifically has FTP for PHP disabled. I had to use 'wget' in my PHP code to solve my issues.