0

Trying to connect to linux via ftp using php in windows. Error shows maximum execution time of 30 secs. exceeded. thou when I tried using filezilla i was able to connect instantly.

Tried connecting using the ff codes:

$con = ftp_connect('xxx.xxxxxxxx.xxx.xx');
$log_res = ftp_login($con, 'username','password');

I'm also using PHP v5.4

Any idea what I might be missing?

cracker_chan
  • 93
  • 1
  • 3
  • 11
  • Show us matching verbose FileZilla session log file. + If you set the maximal executing time longer, does it ever connect? – Martin Prikryl Feb 22 '18 at 15:06
  • 1
    maybe you use SFTP server, function `ftp_connect` is only for FTP – Kazz Feb 22 '18 at 15:34
  • hi @Kazz, I do saw that in the hostname, thou it never occurred to me that sftp would mean a different way of connection. Thank you for pointing me to the right direction. Thou I'm not familiar with this, can you give me tips on what to watch, or it is just the same as ftp_connect just a different keyword – cracker_chan Feb 22 '18 at 16:03
  • this could help: http://php.net/manual/en/function.ssh2-sftp.php – Kazz Feb 22 '18 at 16:11

0 Answers0