Forums

[resolved] How Come FTP Never Works? (27 posts)

  1. Tranny
    Member
    Posted 11 months ago #

    I've been trying to set up automatic plug-in upgrades ever since that feature was available. I type in correct FTP information (same as I'm using with my FileZilla) and keep getting an error message each time:

    Failed to connect to FTP Server....

    First I thought the feature wasn't working well because it was new - so I'd waited for an update to WP. Next update, still not working, so I'm waiting for next update and so on.

    I was really hoping 2.7 update would actually work, but sadness... it still doesn't. What's the deal? How come I can connect to the server with FTP clients but WP can't handle it? Is this feature constantly non-functioning or is there any other catch? Can anyone explain?

    Angie

  2. Otto42
    Moderator
    Posted 11 months ago #

    Maybe your host server does not have DNS set up properly on it, and therefore cannot figure out its own hostname. Or the loopback is intentionally disabled. Or their firewall doesn't allow a connection back to itself.

    Could be any number of things, but the basic underlying premise is the same: Your hosting service sucks. WordPress can only do so much, if the host is broken, then the host is broken. It can't fix broken hosts for you.

    My advice: switch to a hosting service that doesn't suck.

    Here's a list of hosts that Core Update is known to work on:
    http://codex.wordpress.org/Core_Update_Host_Compatibility

    Plugin updates should work on those same hosts, for the same basic reasons.

  3. Tranny
    Member
    Posted 11 months ago #

    Actually, I have a dedicated server with a host that doesn't suck. I've been with some of those you have on a list and the experience was terrible. Now I'm with a host that hosts some of world's busiest sites and is known for superior support. I will find bad experience from people regarding any of your recommended host, you will not find anyone complaining about the host I'm with. They are there for people who really need superior hosting, they're not just another wannabe host.

    Anyone hosting with Bluehost, Dreamhost or Hostgator must be out of their mind. You have them on the list which definitely makes the list a joke.

  4. dwenaus
    Member
    Posted 11 months ago #

    Hey,
    I'm having the same problem with the domains on my own server. It is hosted with servint.net which are pretty darn good at hosting, and popular with people hosting wordpress mu.

    i'm running my server in a VPS. could that be a source of the issue?

    any luck in fixing this problem?

  5. Otto42
    Moderator
    Posted 11 months ago #

    You have them on the list which definitely makes the list a joke.

    The list is a Compatibility list, not a recommendations list. That list reflects what hosts the upgrade functionality has actually been tested on and found to work.

    And if your host is so good, then you should really ask them why your site can't FTP back to itself. Or, better yet, why they're not running suPHP so that WordPress can update itself directly, without the need to FTP to anywhere.

  6. dwenaus
    Member
    Posted 11 months ago #

    how can i get my host to be compatible with this? is there documentation of what they need to implement?

  7. Tranny
    Member
    Posted 11 months ago #

    My advice: switch to a hosting service that doesn't suck.

    That's what you had said. And then you say that it's a "Compatibility list, not a recommendations list."

    (personal attacks removed - we mods don't care for that sort of thing, so tread lightly)

  8. Otto42
    Moderator
    Posted 11 months ago #

    @dwenaus: If the host runs suPHP on their systems, then it'll work without needing to FTP anything.

    If not, then the host will need to be able to FTP back to itself or its own file server. It'll need to have PHP configured to allow outgoing socket connections.

    You could also try using "localhost" or "127.0.0.1" as the ftp server name, that sometimes works.

    @Tranny: Yes, that is exactly what I said and I fail to see the incongruity there. You're the one getting all defensive about your host.

    And I say that if their servers don't work properly, then your host should fix them. A server that cannot do what you want it to do kinda sucks, don't you think?

  9. RoseCitySister
    Member
    Posted 11 months ago #

    I have the solution! Talk to your host. There is no doubt a setting that is preventing FTP from working.

  10. dwenaus
    Member
    Posted 11 months ago #

    @Otto: My host says they can install suPHP, but that it will make it more restrictive for other php scripts in the future. I'd rather not do that.

    are there more specific details about what the script is trying to do, and how:

    the host will need to be able to FTP back to itself or its own file server. It'll need to have PHP configured to allow outgoing socket connections.

  11. siredesigns
    Member
    Posted 11 months ago #

    RoseCitySister is completely right.

    I had trouble with my FTP after switching to my Dedicated server.

    If that's not hte issue, try installing another Wordpress onto your server.

  12. dwenaus
    Member
    Posted 11 months ago #

    oh, and things like localhost won't work because it returns back very strange issues like:
    localhost:localhost

    there seems to be a problem with the script. if I enter my domain name like this: mydomain.com it will return back something very strange like
    mydomain.com:mydomain.com or something else equally as wierd. it seems like it is appending the last entered name with one stored in the options table. no idea.

  13. Tranny
    Member
    Posted 11 months ago #

    I'm just puzzled why you would find it hard to simply say that "you need to ask your host to enable something" which is nothing unusual especially when it comes to fully dedicated boxes - in case of dedi servers they leave it up to you to decide what you want done with your box.

    I had no reason to suspect anything as all other FTP connections work just fine - whether it's via FTP client or via website scripts.

    I'm not all defensive about my host and I'm not here to give any hosts plugs. I just don't understand why you feel the need to pretend that you're holier than thou and mock everything and everyone just cause your position allows for it.

  14. dwenaus
    Member
    Posted 11 months ago #

    I am talking to my host, and hopefully they can find a solution. I'm on a managed hosting solution, so in fact I am my host, but they can help me, and they are. fun :)
    thanks everyone for your helpful advice.

  15. Otto42
    Moderator
    Posted 11 months ago #

    @Otto: My host says they can install suPHP, but that it will make it more restrictive for other php scripts in the future. I'd rather not do that.

    ... That doesn't make any sense to me. suPHP is the default way I install PHP on web servers, because it's *less* restrictive, but more secure in a multi-user setup. suPHP is most common on shared hosts, I grant you.

    I'm just puzzled why you would find it hard to simply say that "you need to ask your host to enable something"

    As I read it, that's pretty much what I did say. Of course, I also then went on to add that if they can't fix it, then they suck.

    Here's the thing: From my point of view, if you're paying somebody else for hosting and you're asking us questions that only your host can fix, then that host has already failed their client. You never should have brought this question here, you should have brought it to your host, who should have recognized that their server was set up wrong, who should have then fixed it. Simple.

    If you didn't ask your host, then my assumption was mistaken, I grant you, but my question for you then becomes "why not?". I mean, if your web server is not doing what you think it should why do you blame the software instead of the configuration? The software *works* in the only possible way that it can work. Beyond that, I don't know what more to tell you.

  16. Tranny
    Member
    Posted 11 months ago #

    If FTP connections with all other programs work, and wordpress is the only one that rejects it - how am I supposed to suspect it's the server issue. If I wasn't able to log in to that FTP from anywhere, then yes. But if all other scripts connect but WP doesn't - then isn't this the most appropriate place to ask?

    I guess you learn something every day. Today I've learned that this forum definitely is not the place to ask.

  17. Otto42
    Moderator
    Posted 11 months ago #

    But if all other scripts connect but WP doesn't - then isn't this the most appropriate place to ask?

    What "other scripts" are you referring to? As far as I know, self-updating via FTP is one of the very few things unique to WordPress. I know of no other scripts that can connect back to itself in this manner.

  18. dwenaus
    Member
    Posted 11 months ago #

    but if wordpress is already on the server, why does it need to use self-referring ftp, why not just use http to get the file? the question and the answer are probably beyond my scope, but I thought i"d ask it anyway.

    other than using suPHP, how can my server provider solve this problem. any advice?

  19. Tranny
    Member
    Posted 11 months ago #

    My issue has been solved. It turns out that there was nothing wrong with my host, the issue in fact was that when WP asks for "Host" what it wants is "localhost" - I always put the name of my server, which is what "Host" normally means. That's why it wasn't working. Simply changing it to localhost fixed the problem. So it was WP related and not hosting related. But at least host support is knowledgeable and willing to help, unlike it is here.

    I still have one more question though - is there a way for WP to store the password so I don't have to type it in each time with each plug in I'm trying to update?

  20. dwenaus
    Member
    Posted 11 months ago #

    I have also solved the problem, but doing the exact same thing. however there is a bug in wordpress somewhere that prevents you from using localhost in that field sometimes. as it stores the host value improperly in the ftp_credentials field in wp_options. Once I deleted this value and set it to localhost, it worked. but not before. So there is a bug in there somewhere in how it is storing the ftp_credentials variable.

    One thing I also did was write the following in config.php
    define('FTP_HOST', 'localhost');
    define('FTP_USER', 'myusername');
    define('FTP_PASS', 'mypassword');
    define('FTP_SSL', false); //TRUE for SLL-connection

    @Tranny - this forum has been very helpful, did you notice that Otto above gave the exact advice that you mention.
    be well everyone :)

  21. dwenaus
    Member
    Posted 11 months ago #

    some more info. the problem is when you add http:// or ftp:// by accident.

    using only mydomain.com as the hostname without the http:// also works as well as localhost

  22. Otto42
    Moderator
    Posted 11 months ago #

    the issue in fact was that when WP asks for "Host" what it wants is "localhost" - I always put the name of my server, which is what "Host" normally means. That's why it wasn't working. Simply changing it to localhost fixed the problem. So it was WP related and not hosting related.

    Actually, that is a hosting related issue. If your host does not know its own name and can't look it up properly, then the FTP stuff won't work, and neither will wp-cron and several other pieces that depend on it (scheduled posts, for example).

    In other words, yes, it should have worked by putting the server name in. Using localhost won't work in many cases.

  23. dwenaus
    Member
    Posted 11 months ago #

    i started a bug on this topic: http://trac.wordpress.org/ticket/8580

    After testing it out thoroughly on my host. I realize it is a WP problem.

    If i enter mydomain.com or localhost the FIRST time, then it will always work.

    It fails if you enter http://mydomain. because the script is looking for a port number after the : and it is not expecting the http://

    if you do this then it stores the actual domain name as a port in the wp_options -> ftp_credentials field. which is wrong, and each time you try again, you get strange results cause it has stored the wrong values.

    deleting this config option via phpmyadmin works and then enter the proper host without the http:// or ftp://. then it works like a charm on any host. (as far as I know)

    hope this helps.

  24. Otto42
    Moderator
    Posted 11 months ago #

    It fails if you enter http://mydomain.

    That's not really a bug because it's not what the question asks for. It wants to know the server name, not the URL. Anything starting with http:// or ftp:// is a URL, not a server name.

    When you use FileZilla and FTP to my site, you connect to http://ftp.example.com. That's the information it needs.

    if you do this then it stores the actual domain name as a port in the wp_options -> ftp_credentials field. which is wrong, and each time you try again, you get strange results cause it has stored the wrong values.

    Now that is indeed a bug. It should default the port to 21 if it is not specified.

    A workaround would be to put in http://ftp.example.com:21 instead. The 21 is the correct port number when it's not given.

  25. dwenaus
    Member
    Posted 11 months ago #

    true enough, but anyway, it has been fixed by dd32 and should be in the 2.7.1 release. cool. my first open source bug. thanks for the help and interest Otto42.

    the port trick that you recommend is a much faster solution than deleting the options field using phpmyadmin. so that should help anyone who has this problem right now get the system to work again. thanks.

  26. dwenaus
    Member
    Posted 11 months ago #

    i think this post could be marked as resolved ?

  27. insidedesign
    Member
    Posted 1 month ago #

    We run a dedicated server with gigenet, and we resolved this issue by recompiling our server's Apache/PHP installation with suPHP

Reply

You must log in to post.

About this Topic

Tags