• Closed
  • Scott Lemon
    Spectator
    August 16, 2023 at 5:50 pm #49035

    We recently upgraded a customer website that was very old. Everything appears to be working, except for the Evolve Plus theme. When we activate the theme, the site has the “PHP Fatal error” below. All plugins are deactivated. If we switch back to a plain theme the site works. Back to Evolve Plus and it fails.

    The server is running Apache and PHP v8.1. WordPress was upgraded to v6.2.2 (just before v6.3 was released)

    The Evolve Plus Theme is v3.0.5

    The Error is:

    [16-Aug-2023 15:40:25 UTC] PHP Fatal error: Uncaught TypeError: ftp_nlist(): Argument #1 ($ftp) must be of type FTP\Connection, null given in /var/www/wordpress/www.website.com/wp-admin/includes/class-wp-filesystem-ftpext.php:427
    Stack trace:
    #0 /var/www/wordpress/www.website.com/wp-admin/includes/class-wp-filesystem-ftpext.php(427): ftp_nlist()
    #1 /var/www/wordpress/www.website.com/wp-admin/includes/class-wp-filesystem-base.php(229): WP_Filesystem_FTPext->exists()
    #2 /var/www/wordpress/www.website.com/wp-admin/includes/class-wp-filesystem-base.php(58): WP_Filesystem_Base->find_folder()
    #3 /var/www/wordpress/www.website.com/wp-content/themes/evolve-plus/inc/admin/customizer/customizer.php(1225): WP_Filesystem_Base->abspath()
    #4 /var/www/wordpress/www.website.com/wp-content/themes/evolve-plus/inc/admin/customizer/customizer.php(1181): evolve_get_controls_from_json()
    #5 /var/www/wordpress/www.website.com/wp-includes/class-wp-hook.php(308): evolve_load_the_theme_options()
    #6 /var/www/wordpress/www.website.com/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()
    #7 /var/www/wordpress/www.website.com/wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 /var/www/wordpress/www.website.com/wp-settings.php(623): do_action()
    #9 /var/www/wordpress/www.website.com/wp-config.php(89): require_once('...')
    #10 /var/www/wordpress/www.website.com/wp-load.php(50): require_once('...')
    #11 /var/www/wordpress/www.website.com/wp-cron.php(46): require_once('...')
    #12 {main}
    thrown in /var/www/wordpress/www.website.com/wp-admin/includes/class-wp-filesystem-ftpext.php on line 427

    This APPEARS to be related to WordPress maybe passing some bad value to the Evolve Plus theme? I found numerous posts about a similar error and being told to set the “FS_METHOD” to “direct” in the config file but this does not work and makes no difference.

    Any suggestions on what might be causing this and how we would edit the database or make some other change to fix this?

    We are an extremely technical team and well versed at debugging and writing plug-ins, but are having a hard time tracking down where this is going wrong.

    Evgeny
    Keymaster
    Posts: 988
    August 17, 2023 at 12:20 pm #49046

    Have a look at wp-admin/includes/file.php for get_filesystem_method() function. And please, if you figure out how to solve it, do let me know. Thank you.

    Scott Lemon
    Spectator
    Posts: 17
    September 10, 2023 at 2:13 am #49083

    Hello! I apologize that I did not see this reply, but I DID finally solve this.

    It is so weird, and they do not log any output, but you nailed it. In that file they appear to read files and determine the owner of one of the wordpress files, then they create a file and if the owner is not identical then they shift to the FTP method.

    I had to look to see that my instance was running as the “apache” user, and even though all of the files had RW permissions for root:apache that wasn’t good enough.

    After chowning everything as apache:apache it worked!

    Thanks again for your quick assistance looking at this, and I’m glad that I now know this.

    Evgeny
    Keymaster
    Posts: 988
    September 11, 2023 at 2:59 pm #49085

    Hi! Thank you very much for the update! Happy to hear that everything worked out, and just in case it happens again, we have a solution.