PDA

View Full Version : FTP Port


OneNoneBlond
17th of July 2010 (Sat), 16:12
Hi everyone!
Have a problem on server with EE 2.0. I guess that the problem is FTP port, because provider gave me the information that i have to use FTP port 4433 with my FTP client and when testing FTP on EE i get following error:
FAILED Reason: fsockopen() [function.fsockopen]: unable to connect to ftp.sandy-poodle.com:21 (Connection refused)
I guess it's because it is using port 21.
Is there a way to change the default port to smthg else than 21?
Thanks in advance!
Regards!

Sorry guys! I just found the thread I needed, somehow overlooked it yesterday, lol

http://photography-on-the.net/forum/showthread.php?t=30838

OneNoneBlond
18th of July 2010 (Sun), 03:33
Unfortunately it didn't solve my problem. The FTP tests are however running smoothly without any error, but when I upload photo i get error messages and still see port 21 in them:
---------------------------------------------------------------------
msg 4214 | internal ftp: UPLOAD FINISHED WITH ERRORS.
msg 4213 | database action: Photo id 5 added to database.
msg 4212 | ftp: --------------------------------------------
msg 4211 | ftp: LOCAL: FAILED TO DISCONNECT. Reason: unknown
msg 4210 | internal ftp: LOCAL: ERROR in connecting to '173.193.2.240'. Reason: fsockopen() [function.fsockopen]: unable to connect to 173.193.2.240:21 (Connection refused)
msg 4209 | internal ftp: ERROR: unable to connect to server (timeout 20 seconds).
server: 173.193.2.240
port: 21
errno: 111
errstr: Connection refused
timeout: 20
---------------------------------------------------------------------
what did I do wrong and how to make it work?
Any ideas or suggestions would be highly appreciated!
Thanks!

OneNoneBlond
18th of July 2010 (Sun), 05:19
Didn't work inspite from initialising the $port with 4433 in this line of FTP_ee_library.php:

function ee_internal_ftp_connect ($server,$port=4433,$timeout=20,$wait=0,$resource="")

Only when I changed also the function call from:

$resource = fsockopen ($server, $port, $errno, $errstr, $timeout);
to:
$resource = fsockopen ($server, 4433, $errno, $errstr, $timeout);

in two places in the FTP_ee_library.php file I saw the change of the port in system messages and now it works :)