• Resolved fredcy

    (@fredcy)


    I am upgrading our site to PHP 7.4 and I’m seeing many PHP warnings of this shape on every page load:

    PHP Warning:  ftp_nlist() expects parameter 1 to be resource, null given in /srv/www/www/wp/wp-admin/includes/class-wp-filesystem-ftpext.php on line 421,
    PHP Warning:  ftp_pwd() expects parameter 1 to be resource, null given in /srv/www/www/wp/wp-admin/includes/class-wp-filesystem-ftpext.php on line 231,

    If I disable the Visualizer plugin, then the above errors go away completely.

    ==> So Visualizer appears to be responsible for causing these PHP warnings. How can I make them stop while still using Visualizer?

    == More info ==

    The WordPress core files are (intentionally) not writable by Apache on our webserver.

    Visualizer: 3.7.4
    Server: Server Apache/2.4.6 (Red Hat Enterprise Linux) OpenSSL/1.0.2k-fips PHP/7.4.28
    Wordpress: 5.9.1

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter fredcy

    (@fredcy)

    The top (most recently called) of the call stack at the point of the error looks like this:

    1. wp/wp-admin/includes/class-wp-filesystem-ftpext.php ‘451
    2. wp/wp-admin/includes/class-wp-filesystem-ftpext.php ‘423
    3. wp/wp-admin/includes/class-wp-filesystem-base.php ‘229
    4. wp/wp-admin/includes/class-wp-filesystem-base.php ’76
    5. wp-content/plugins/visualizer/classes/Visualizer/Module.php ‘524
    luciamarinescu

    (@luciamarinescu)

    Hi @fredcy,

    Thanks for choosing Visualizer!

    Unfortunately only the last error points to Visualizer, the rest of them are pointing to files from WordPress itself, so I wouldn’t say the issue is coming from Visualizer. In these cases, making a back-up of the site and then making a fresh installation of WordPress could help. Please keep in mind that no major changes should be done on a site before making a back-up.

    Have a nice day!

    Thread Starter fredcy

    (@fredcy)

    Visualizer hooks into the wordpress framework, so of course part of the stack is going to involve standard wordpress functions; and so that does not absolve Visualizer as being the culprit here. The bottom line is that that whether the errors appear or not correlates exactly with Visualizer being being enabled or not.

    luciamarinescu

    (@luciamarinescu)

    @fredcy The issue may occur due to a plugin conflict. You could install the Health Check & Troubleshooting plugin, enable the troubleshooting mode which will deactivate all plugins, reactivate Visualizer and check if the issue persists. If the problem doesn’t occur anymore, it means it was indeed caused by a plugin conflict and you should reactivate the plugins one by one, until you find the culprit. Then, replace that plugin with an alternative one. You can also switch to the default Twenty Twenty One theme and check if the issue still occurs.

    Have a nice day!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP errors about ftp_pwd and ftp_nlist in PHP 7.4’ is closed to new replies.