View Full Version : Different FTP Port
Giovanni
26th of April 2004 (Mon), 10:34
I d/l and installed EE 1.5 and it works great as new installation. However, my ISP charter.net does not allowed port 21 and therefore, the FTP upload utility does not work outside my router or in the public side. It simply works inside, in the private side of my router. I'm using IIS 6 as my FTP server.
Is there a way to add an option or modify the existing code to look for PORT XX of the FTP server site option?
Any help or recommenation would be appreciated.
Thanks.
Giovanni Arteaga
Rancho Cucamonga, CA
Pekka
26th of April 2004 (Mon), 13:06
For internal FTP change line
function ee_internal_ftp_connect ($server,$port=21,$timeout=30,$wait=0,$resource ="") {
in file FTP_ee_library.php
If you use PHP ftp module (basically required only if you need non-passive transfers) you must change line 2053 in fetchsettings.php from
$ee_connection = ftp_connect ($ftp_server);
to
$ee_connection = ftp_connect ($ftp_server,1234);
where 1234 is port number.
I have not tested these, but it should work.
I'll have to put port selection to todo list.
Giovanni
26th of April 2004 (Mon), 13:39
So, I was brave to make the changes. I get the following errors: what do they mean?
FAILED Reason: ftp_put(): Connection closed; transfer aborted.
See below.
CONNECTION (ftp address): OK
LOGIN (username and password): OK
SET PASSIVE MODE: OK
PWD: /
CHANGE DIRECTORY TO '/mygallery/test': OK
CREATE DIRECTORY 'ee_ftp_test_directory_creation': OK
CHANGE DIRECTORY TO '/mygallery/test/ee_ftp_test_directory_creation': OK
CHANGE DIRECTORY TO '/mygallery/test': OK
DIRECTORY 'ee_ftp_test_directory_creation' REMOVAL: OK
UPLOAD TEST IMAGE 'ee_test0.jpg': FAILED Reason: ftp_put(): Connection closed; transfer aborted.
GET 'ee_test0.jpg' SIZE: FAILED Reason: ftp_put(): Connection closed; transfer aborted.
GET 'ee_test0.jpg' MODIFIED DATA: OK
UPLOAD TEST IMAGE 'ee_test1.jpg': FAILED Reason: ftp_put(): Connection closed; transfer aborted.
GET 'ee_test1.jpg' SIZE: FAILED Reason: ftp_put(): Connection closed; transfer aborted.
GET 'ee_test1.jpg' MODIFIED DATA: OK
UPLOAD TEST IMAGE 'ee_test2.jpg': FAILED Reason: ftp_put(): Connection closed; transfer aborted.
GET 'ee_test2.jpg' SIZE: FAILED Reason: ftp_put(): Connection closed; transfer aborted.
GET 'ee_test2.jpg' MODIFIED DATA: OK
UPLOAD TEST IMAGE 'ee_test3.jpg': FAILED Reason: ftp_put(): Connection closed; transfer aborted.
GET 'ee_test3.jpg' SIZE: FAILED Reason: ftp_put(): Connection closed; transfer aborted.
GET 'ee_test3.jpg' MODIFIED DATA: OK
UPLOAD TEST IMAGE 'ee_test4.jpg': FAILED Reason: ftp_put(): Connection closed; transfer aborted.
GET 'ee_test4.jpg' SIZE: FAILED Reason: ftp_put(): Connection closed; transfer aborted.
GET 'ee_test4.jpg' MODIFIED DATA: OK
DELETE REMOTE TEST IMAGE 'ee_test0.jpg': OK
DELETE REMOTE TEST IMAGE 'ee_test1.jpg': OK
DELETE REMOTE TEST IMAGE 'ee_test2.jpg': OK
DELETE REMOTE TEST IMAGE 'ee_test3.jpg': OK
DELETE REMOTE TEST IMAGE 'ee_test4.jpg': OK
DISCONNECTION FROM SERVER (close): OK
Pekka
26th of April 2004 (Mon), 13:59
If I change the port it works ok here. Could be your firewall related to passive connections. Try to set ftp firewall to let pass passive ports free (passive port is negotiated each time independently so this should be done so that you define a range of allowed passive transfer ports and then open those in firewall).
Can you set in ftp test page the FTP ENGINE to "EE Internal FTP" and try again?
You can also try PHp ftp module without passive mode - in this case the data port is ftp port minus 1 (20 by default).
Giovanni
27th of April 2004 (Tue), 11:12
Well, I decided to leave everything back to default.
I ended up using localhost as the FTP server and port 21.
I think in a real server environment, making changes as you suggested should work.
I look forward to see an option in the user interface to specify the port.
Thanks for your help.
PS: I have everything working.
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.