CodeIgniter Forums
Can't connect to ftp client - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Can't connect to ftp client (/showthread.php?tid=56022)



Can't connect to ftp client - El Forum - 11-21-2012

[eluser]Pakm@n[/eluser]
Hello
I'm working in a web application using a database.
On the database I relate files hosted on a server path with a database record.
So when i select a record, i can see it's files.

Anyways if i try to delete the record from the database, i also want to delete the files stored on the server.
I use the ftp library to do that.
Two days ago it was working perfectly but now, everytime i try to connect to my server via the ftp library, it shows the next message:
Quote:Unable to login to your FTP server. Please check your username and password.
.

this is the code i use:
on my config folder i have an ftp.php file with this options:
Code:
<?php
$config['hostname'] = 'xxxxx';
$config['username'] = 'xxxxx';
$config['password'] = 'xxxxx';
$config['port']     = 21;
$config['passive']  = TRUE;
$config['debug']  = TRUE;
$config['conn_id'] = TRUE;
?>

Then on my controller i do this:
Code:
$this->load->library('ftp');
  
  if ($this->ftp->connect())
  {
   echo "Woohoo!";
  }
  else
  {
   echo "D'oh!!";
  }

Any ideas why I can't connect to the server?
I can connect via FileZilla and the notepad++ ftp client, so i don't know why i can't connect when my application is running

Thanks in advance for your help !