{ Dev Farm }

Web & Windows Development

PHP errors accessing GPX cache with version 1.7.11

Home Forum Wp Gpx Maps Support PHP errors accessing GPX cache with version 1.7.11

  • Il topic è vuoto.
Stai visualizzando 1 post (di 1 totali)
  • Autore
    Post
  • #109800 Rispondi
    Ben
    Ospite

    Wordpress 6.7.2, PHP 8.0.30, Apache 2.4.62, WP-GPX-Map 1.7.11

    At some point, and I’m not sure which update caused this, I began getting PHP errors on my pages showing WP-GPX-Maps:

    PHP Fatal error:  Uncaught TypeError: ssh2_sftp_mkdir(): Argument #1 ($sftp) must be of type resource, null given in /home/benmassey/www/wp-admin/includes/class-wp-filesystem-ssh2.php:703
    Stack trace:
    #0 /home/benmassey/www/wp-admin/includes/class-wp-filesystem-ssh2.php(703): ssh2_sftp_mkdir()
    #1 /home/benmassey/www/wp-content/plugins/wp-gpx-maps/wp-gpx-maps.php(355): WP_Filesystem_SSH2->mkdir()
    #2 /home/benmassey/www/wp-includes/shortcodes.php(434): wpgpxmaps_handle_shortcodes()
    #3 [internal function]: do_shortcode_tag()
    #4 /home/benmassey/www/wp-includes/shortcodes.php(273): preg_replace_callback()
    #5 /home/benmassey/www/wp-content/plugins/insert-php/includes/shortcodes/shortcode-php.php(60) : eval()'d code(752): do_shortcode()
    #6 /home/benmassey/www/wp-content/plugins/insert-php/includes/shortcodes/shortcode-php.php(60): eval()
    #7 /home/benmassey/www/wp-content/plugins/insert-php/libs/factory/shortcodes/shortcode.class.php(289): WINP_SnippetShortcodePhp->html()
    #8 /home/benmassey/www/wp-content/plugins/insert-php/libs/factory/shortcodes/shortcodes.php(98): Wbcr_FactoryShortcodes335_Shortcode->render()
    #9 /home/benmassey/www/wp-includes/shortcodes.php(434): Wbcr_FactoryShortcodes335_ShortcodeManager->__call()
    #10 [internal function]: do_shortcode_tag()
    #11 /home/benmassey/www/wp-includes/shortcodes.php(273): preg_replace_callback()
    #12 /home/benmassey/www/wp-includes/class-wp-hook.php(324): do_shortcode()
    #13 /home/benmassey/www/wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #14 /home/benmassey/www/wp-includes/post-template.php(256): apply_filters()
    #15 /home/benmassey/www/wp-content/themes/benmasseydotca/single.php(161): the_content()
    #16 /home/benmassey/www/wp-includes/template-loader.php(106): include('...')
    #17 /home/benmassey/www/wp-blog-header.php(19): require_once('...')
    #18 /home/benmassey/www/index.php(17): require('...')
    #19 {main}
      thrown in /home/benmassey/www/wp-admin/includes/class-wp-filesystem-ssh2.php on line 703

    The exact error depends on which FS_METHOD I have defined in wp-config.php; I get different errors with direct and the FTP ones. This is SSH2, which is my usual setting.

    This is something to do with it talking to the file system when dealing with the cache. If I just comment out lines 352 – 356 in wp-gpx-maps.php:

    /*
            if ( ! ( $wp_filesystem->exists( $gpxcache ) && $wp_filesystem->is_dir( $gpxcache ) ) )
            {
                    $wp_filesystem->mkdir( $gpxcache, 0755, true );
                    //@mkdir( $gpxcache, 0755, true );      
            }
    */

    …I get different errors, although the code is looking for a .tmp file path that does exist. If I comment that out and set $skipcache to true, the plugin works.

Stai visualizzando 1 post (di 1 totali)
Rispondi a: PHP errors accessing GPX cache with version 1.7.11

You can use BBCodes to format your content.
Your account can't use Advanced BBCodes, they will be stripped before saving.

Le tue informazioni:




Non è possibile lasciare nuovi commenti.