I using codeigniter 3.1.13 , php 5.6 and i using FTP to connect to another server, which unfortunately gives the following error:
Unable to connect to your FTP server using the supplied hostname.
Ftp:
$config['hostname'] = 'xxxxx.xxxxxx.net';
$config['username'] = 'xxxxxx';
$config['password'] = 'xxxxxx';
$config['debug'] = TRUE;
$config['port'] = 21;
$config['passive'] = TRUE;
This is if I connect to FTP with the same information by filezilla
Library ftp: https://pastecode.io/s/uxziv8aw
What do i do?
CodePudding user response:
If you can connect to the server but are not able to transfer the file (as you mentioned in one of your comments), there might be 2 problems:
- Firewall
- Missing permission on the FTP server to write upload file.
Please be sure that your Firewall (if you have any one) does not block outgoing FTP connections and the directory on the FTP server has the needed permissions to write files into it.
CodePudding user response:
You can display the error messages by changing debug
from TRUE
to FALSE
.
$config['debug'] = FALSE;