• Resolved barthuis

    (@barthuis)


    Hi, is it possible to install this plugin without ftp access for the plugin? we tried to install it through the normal installation and by uploading it ourselfs in our ftp client, but when we want to activate it, i shows this error:

    
    Fatal error: Uncaught TypeError: ftp_nlist(): Argument #1 ($ftp) must be of type resource, null given in /var/sftp/uploads/[site]/wp-admin/includes/class-wp-filesystem-ftpext.php:420 
    Stack trace:
    #0 /var/sftp/uploads/[site]/wp-admin/includes/class-wp-filesystem-ftpext.php(420): ftp_nlist()
    #1 /var/sftp/uploads/[site]/wp-content/plugins/custom-layouts/includes/core/class-css-loader.php(554): WP_Filesystem_FTPext->exists()
    #2 /var/sftp/uploads/[site]/wp-content/plugins/custom-layouts/includes/core/class-upgrade.php(34): Custom_Layouts\Core\CSS_Loader::save_css()
    #3 /var/sftp/uploads/[site]/wp-content/plugins/custom-layouts/includes/core/class-activator.php(34): Custom_Layouts\Core\Upgrade::upgrade()
    #4 /var/sftp/uploads/[site]/wp-content/plugins/custom-layouts/custom-layouts.php(37): Custom_Layouts\Activator::activate()
    #5 /var/sftp/uploads/[site]/wp-includes/class-wp-hook.php(303): activate_custom_layouts()
    #6 /var/sftp/uploads/[site]/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #7 /var/sftp/uploads/[site]/wp-includes/plugin.php(470): WP_Hook->do_action()
    #8 /var/sftp/uploads/[site]/wp-admin/plugins.php(193): do_action()
    #9 {main} thrown in /var/sftp/uploads/[site]/wp-admin/includes/class-wp-filesystem-ftpext.php on line 420
    
    • This topic was modified 2 years, 9 months ago by barthuis.
    • This topic was modified 2 years, 9 months ago by Marius L. J.. Reason: Wrapped log output for readability
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Code Amp

    (@codeamp)

    Hey @barthuis

    Sorry to hear you’re having troubles.

    That is most odd, we use a WP function for creating a CSS file in your /uploads folder.

    If your site doesn’t have that write access or FTP access, then we will load the CSS in your pages.

    In any event, an error should not be thrown, because all cases should be handled :/

    This sounds like it might be an issue with this particular function in WP, and your environment (I can only guess at this stage).

    Some things I would do (and please let me know answers to see if I can help more)

    1 – What version of WP are you, can you update to latest?
    2 – Are your plugins out of date, can you update them to latest?3 – Are you on a shared host?
    3 – When you add other plugins, do you have similar issues?
    4 – The error message, is it on activation (preventing actual activation)? Could you share a screenshot?

    Some similar / related issues I found that I’m reading through at the moment:

    https://wordpress.org/support/topic/ftp_nlist-expects-parameter-1-to-be-resource-null-given/#post-13864001
    https://wordpress.org/support/topic/ftp_nlist-and-ftp_pwd-error/
    https://wordpress.stackexchange.com/questions/365737/ftp-nlist-and-ftp-pwd-warnings
    https://wpml.org/forums/topic/warning-ftp_nlist-expects-parameter-1-to-be-resource-null-given-in-var-www/

    Thanks

    • This reply was modified 2 years, 9 months ago by Code Amp.
    Thread Starter barthuis

    (@barthuis)

    1 – What version of WP are you, can you update to latest?
    installes a fresh one some time ago, its up to date on 5.8 now

    2 – Are your plugins out of date, can you update them to latest?3 – Are you on a shared host?
    The plugin is freshly downloaded, and no, we own our own server

    3 – When you add other plugins, do you have similar issues?
    We had issues before with a theme where we had to give in ftp credentials, but then it worked.

    4 – The error message, is it on activation (preventing actual activation)? Could you share a screenshot?
    yes on activation:
    https://paste.pics/2d1a3e11791a4a062d2a08e82822085b

    Plugin Author Code Amp

    (@codeamp)

    Hey @barthuis

    Thanks for the detailed info.

    After looking through other tickets of a similar nature, the best bet I can see is that a configuration issue on the server is causing WP to try to trigger this mode, when it should not (specifically when a plugin like ours is using WP_Filesystem)

    However, it looks like some other plugin authors have managed to work around this.

    I’ll try see if we can achive something similar, but its going to be next week before I can have a proper look at this – probably not an ideal scenario when testing out a new plugin I know!

    I will update with my findings next week.

    Best
    – Ross

    Thread Starter barthuis

    (@barthuis)

    Thanks, if you want us to test it for you, just send us a separate download link and we’ll try it out!
    Bart

    Plugin Author Code Amp

    (@codeamp)

    Hi Bart

    Apologies for the delay on this.

    I’ve been doing some extensive testing and I cannot reliably recreate this issue in order to resolve it.

    I have even gone as far as replacing a lot of the file system code, but in the end, it looks like its the wrong approach just to work around this issue.

    Could you try adding this:

    define('FS_METHOD', 'direct');

    to wp-config?

    From my understanding, using the above constant in a shared host could be a security issue (if the host is not configured correctly), but as you mention, you have your own servers so I think its ok to use that constant.

    If that doesn’t work, then I have some other ideas about tackling this but they don’t look like quick fixes.

    Best

    Plugin Author Code Amp

    (@codeamp)

    Hey @barthuis – as I didn’t hear back I’m closing this for now.

    Please re-open should you need to – and please do let me know if the above did/didn’t work out for you if you can.

    Best
    -Ross

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Install without ftp?’ is closed to new replies.