WordPress.org

Ready to get started?Download WordPress

Forums

Automatic Plugin Upgrade Problem (12 posts)

  1. isdoro81
    Member
    Posted 5 years ago #

    Hi,

    I've hosted my site on Servage, when i try to upgrade a plugin, it asks my the ftp access password, the ftp server and if i use ssl (with other hosting it doesn't need to set this info), i set these infos and then i go ahead.

    I have this error:

    Warning: ftp_pwd() [function.ftp-pwd]: Opening ASCII mode data connection for file list in /mounted-storage/home20b/sub001/sc18587-YDFT/www/wp-admin/includes/class-wp-filesystem-ftpext.php on line 122

    Warning: ftp_pwd() [function.ftp-pwd]: Opening ASCII mode data connection for file list in /mounted-storage/home20b/sub001/sc18587-YDFT/www/wp-admin/includes/class-wp-filesystem-ftpext.php on line 122

    Impossible to find the plugins directory.

    I use the correct passwords.

    Thanks

    Giulio

  2. Samuel B
    moderator
    Posted 5 years ago #

    Some servers will not allow this action. Contact your host and ask if they will fix this.

  3. isdoro81
    Member
    Posted 5 years ago #

    Hi,

    I don't think that's a server configuration error.

    Warning: ftp_pwd() [function.ftp-pwd]: Transfer aborted. Link to file server lost in /mounted-storage/home20b/sub001/sc18587-YDFT/www/wp-admin/includes/class-wp-filesystem-ftpext.php on line 122

    Warning: ftp_pwd() [function.ftp-pwd]: CWD command successful in /mounted-storage/home20b/sub001/sc18587-YDFT/www/wp-admin/includes/class-wp-filesystem-ftpext.php on line 122

    Warning: ftp_pwd() [function.ftp-pwd]: PORT command successful in /mounted-storage/home20b/sub001/sc18587-YDFT/www/wp-admin/includes/class-wp-filesystem-ftpext.php on line 122

    Warning: ftp_pwd() [function.ftp-pwd]: CWD command successful in /mounted-storage/home20b/sub001/sc18587-YDFT/www/wp-admin/includes/class-wp-filesystem-ftpext.php on line 122

    If you keep a close eye on the error you will see command is successful but the link from where it should upgrade the plugin is not given at line 122 from file /www/wp-admin/includes/class-wp-filesystem-ftpext.php

    Please check this line $cwd = ftp_pwd($this->link);

    The connection has been established but desired link is not found. So that will be the link to set there.

    Thanks for your help

    Giulio

  4. Samuel B
    moderator
    Posted 5 years ago #

    Not a server config error - but host won't allow server to do this function. Checked with them?

  5. isdoro81
    Member
    Posted 5 years ago #

    Hi,

    Thanks for your help, this is the answer of Servage:

    I am sorry to say that you cannot connect to FTP from any script using the port 21. Please check how you can change the port to 2121. Else it is not possible to connect to FTP.

    Can i change the port? How?

    Thanks again

    Giulio

  6. Samuel B
    moderator
    Posted 5 years ago #

    I use Filezilla.
    You can easily change ports at the interface to whatever number needed.

  7. mcs_trekkie
    Member
    Posted 5 years ago #

    I was just able to fix "this issue".
    Looks like Servage do have some issues with active FTP transfers to their own FTP servers. I just "fixed" this by switching to passive transfer method by patching class-wp-filesystem-ftpext.php.
    Maybe some developer could make passive transfer selectable from the UI ??

  8. MichaelH
    Member
    Posted 5 years ago #

    mcs_trekkie - can you detail the changes you made?

    Have you considered suggesting that change at WordPress Trac?

    http://trac.wordpress.org
    Reporting Bugs

    Thanks for the info.

  9. mcs_trekkie
    Member
    Posted 5 years ago #

    well I don't know the internals of WordPress very well so providing a full patch including buttons and all saving the setting somewhere is a little bit difficult right now.
    I simply added ftp_pasv($this->link, 1) after the ftp_login call in the connect() function so passive mode is always used.

    But I could try to make a full patch for this feature in the next days....

  10. MichaelH
    Member
    Posted 5 years ago #

    Well if you don't want to prepare a patch, just report a trac ticket and show the line(s) of code you used to make the change. Use your forum login/password to login at trac. Good Luck.

  11. Dion Hulse
    WordPress Dev
    Posted 5 years ago #

    This is only for 2.7 i believe, 2.6 doesnt support it AFAIK: If you need to change the ftp port, You can set the hostname as such: http://ftp.hostname.com:2121

    As for passive mode, Opening a trac ticket would be best. FTP Passive Mode is allready used by 2 of the 3 FTP transports (There's 3 different FTP connection methods supported by WordPress, depending on what the host allows). Enabling it for the 3rd shouldnt cause any issues. I'll open a Trac ticket later today if the OP doesnt.

    I absolutely hate the fact that the FTP PHP Extension raises warnings for sucessful commands, So most of the warnings mentioned on this topic can be ignored (2.7 silences these warnings too), Transfer aborted. Link to file server lost might need to get some extra attention though, It might need to fail gracefully if the link is lost.

  12. mcs_trekkie
    Member
    Posted 5 years ago #

    I have just opened a ticket in Trac and appended a patch for 2.6.2 which adds passive FTP support for WP_Filesystem_FTPext and allows to choose if passive mode should be used or not in the update.php.

    It was easier to get the input thing done than I first thought as I never did take a deeper look into the wordpress sources before.

    The ticket is here:
    http://trac.wordpress.org/ticket/7940

Topic Closed

This topic has been closed to new replies.

About this Topic