View Full Version : JFTP::connect: Could not connect to host "127.0.0.1" on port 21
scottcurts
1-9-09, 01:01 AM
I have a couple of accounts here that I'm using joomla and having trouble ftping into the media manager.
When i set the server settings to ftp in the global config this is the error message I'm receiving:
JFTP::connect: Could not connect to host "127.0.0.1" on port 21
Do i need to change the configuration.php file? or the php.ini file? to reflect the account's ftp settings?
<moved from the general discussions forum>
Croc Hunter
1-9-09, 01:46 AM
That IP doesn't look right to me. Are you sure you have ftp.powweb.com as the host address?
scottcurts
1-9-09, 03:22 AM
in the Joomla global configuration the ftp in the server tab is set to
host: 127.0.0.1
ftp port: 21
ftp username: admin username for joomla
ftp password: pw for joomla
ftp root: blank
that's when I receive the error: JFTP::connect: Could not connect to host "127.0.0.1" on port 21
When I tried changing it to:
host: ftp.powweb.com
host port: 21 (i don't know otherwise)
username: my powweb username
password: my powweb pw
ftp root: /htdocs/
I receive this message:
* JFTP::login: Unable to login
* JFTP::write: Unable to use passive mode
* JFTP::delete: Bad response
* JFTP::write: Unable to use passive mode
An Error has occurred! Unable to open configuration.php file to write!
So, that's why i think something isn't coordinated with the configuration.php.
I'm not well versed with the php yet.
Thanks Croc. you've helped me out in the past too.
Croc Hunter
1-9-09, 08:09 AM
Port 21 is right for FTP. To be writeable a file should be chmod 755 (or 777) but is a huge security risk for a config file. Not logical to me but you can try 755 just be sure to put it back to 644 or 600. Is your Powweb user/pass what you normally use for FTP? Also be sure you don't have any spaces at the beginning or end of your details.
127.0.0.1 is the loopback interface if memory serves me.
seems to me the thing to do is connect using a regular FTP program...I assume you can do this, but it will rule out username/pass issues for those of us following this thread.
I seem to recall someone having trouble with FTP through PHP before; no resolution here though - http://forum.powweb.com/showthread.php?t=80481
this may help: http://forum.powweb.com/showthread.php?t=76094
entrecon
1-10-09, 09:10 AM
I just looked at my Joomal install (1.5) and the 127.0.0.1 is the default value that the package ships with. When you actually set it in the Global Configuration you have to enable it, as well as put in host, port, username password, and ftp root. I tried setting mine, and I get a similar error. I know on previous versions I used a tool called JoomlaeXplorer in "file" mode, but I am not seeing it on the Joomla site right now.
edit:
I found it here http://extensions.joomla.org/extensions/102/details but it looks like for 1.5 most folks like this one http://extensions.joomla.org/extensions/core-enhancements/file-management/2630/details
scottcurts
1-10-09, 03:28 PM
I just looked at my Joomal install (1.5) and the 127.0.0.1 is the default value that the package ships with. When you actually set it in the Global Configuration you have to enable it, as well as put in host, port, username password, and ftp root. I tried setting mine, and I get a similar error. I know on previous versions I used a tool called JoomlaeXplorer in "file" mode, but I am not seeing it on the Joomla site right now.
Yes, this is the problem I'm having. With my own personal sites I can work around this. However, I have sites for clients where I'm trying to make it as easy as possible for them to manage their CMS. Being able to use their media manager would be the best beneficial purpose.
I'll check out those extensions. However, I'd also like to just get the ftp to work with the media manager so my clients can upload their images using the media manager. I must also say that it seems to be with my clients that I have referred Powweb as their hosting company. I other clients that useother hosting companies and I haven't even run into this problem.
When I check their global configs, they are using the default IP 127.0.0.1 with port 21 and their /public_html/ as the root dir. I checked their permissions on their configuration.php file and it is set to 444. I'm not sure about what these indicate yet.
Is their something I need to change in the php.ini file too? or the configuration.php?
scottcurts
1-10-09, 04:58 PM
As I am comparing the host companies set up with my different clients. I see that the other hosting companie's database accounts are set to localhost, where the Powweb accounts all have to be set as username.powwebmysql.com. This was necessary to get the databases to connect. That's why I'm thinking that this issue can or must be resolved through the php.ini file or the configuration.php file. I don't know. I'm guessing at this point. hahahah
entrecon
1-10-09, 05:06 PM
First, as soon as a monderator stops in here the other host names will be removed. You may want to just edit them out yourself. Forum policy is for no other host to be metnioned.
Second, it is possible that PowWeb does not allow this type of connection. I know they block alot of ports and don't allow certain types of remote connection.
scottcurts
1-10-09, 08:20 PM
Hmmm. Thanks for the suggestions. I removed those names. I apologize for not following protocol.
entrecon
1-10-09, 08:58 PM
You mentioned that you wanted them to be upload using the media manager. I was able to upload without having the FTP settings in place.
scottcurts
1-10-09, 09:02 PM
You mean just removing the ftp settings from the fields?
I tried that but no luck. I have to go to work, so I'll be back to work on this issue tomorrow. Thanks.
entrecon
1-10-09, 10:07 PM
I just left them the way they were. I went to the media manager and was able to upload a file.
scottcurts
1-11-09, 04:00 AM
Hmm. Ok. Well, I'll keep trying and let you know how it works out. Thanks.
scottcurts
1-19-09, 03:42 AM
I can't believe it. I'm much better at double checking. It turns out that my laptop isn't allowing me to upload. It's not the server at all. I tested it on 3 other computers and the ftp upload is working in the media manager in Joomla.
I greatly appreciate all of your time in helping me with this issue. I replied to my support ticket and indicated my mistake.
Crow is good for breakfast.
p.s. I have saved this thread as you all had great input for my knowledge. Thank you.
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.