Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Looks like it might be related to a change in the sftp.php file. This line was changed…

    FROM:
    if (isset($_FILES['private_key_file']) && file_exists($_FILES['private_key_file']['tmp_name'])) {

    TO:
    if (isset($_FILES['private_key_file']['tmp_name']) && file_exists($_FILES['private_key_file']['tmp_name'])) {

    I suspect this might be the issue.

    I ran into this issue and it has to do with file size > memory limit with output buffering on.

    What the plugin should do in at least the download_file() function is to check the output buffer level and flush it out until all levels have been flushed.

    see the note on php.net/readfile

    Note:
    readfile() will not present any memory issues, even when sending large files, on its own. If you encounter an out of memory error ensure that output buffering is off with ob_get_level().

    • This reply was modified 7 years, 1 month ago by nobleclem.
    Thread Starter nobleclem

    (@nobleclem)

    No worries. I was able to download and test and 1.3.7-RC1 seems to be working as expected.

    Thank you!

    Thread Starter nobleclem

    (@nobleclem)

    So checked the settings and “output_buffering = 4096” … this is a default RedHat/CentOS setting. Also was checking some of the PHP doc comments and there is a comment about if output_buffering is > 0 then ob_get_level will return 1. And I suspect that since its done VIA php configuration then you can’t actually make ob_get_level() = 0.

    If you don’t like my initial proposed solution you could just do something like (not tested):

    for( $i = 0; $i < ob_get_level(); $i++ ) {
        @ob_end_clean();
    }

    Thread Starter nobleclem

    (@nobleclem)

    found a quick fix that seems to do the job. The problem seems to do with when the widget is loaded. It should be loaded at the widgets_init hook not the init hook.

    edit bu-navigation.php
    change function register_hooks()
    from:

    /**
         * Attach WordPress hook callbacks
         */
        public function register_hooks() {
    
            add_action( 'plugins_loaded', array( $this, 'add_cache_groups' ) );
            add_action( 'init', array( $this, 'init' ), 1 );
    
        }

    to:

    /**
         * Attach WordPress hook callbacks
         */
        public function register_hooks() {
    
            add_action( 'plugins_loaded', array( $this, 'add_cache_groups' ) );
            add_action( 'init', array( $this, 'init' ), 1 );
            add_action( 'widgets_init', array( $this, 'load_widget' ) );
    
        }

Viewing 5 replies - 1 through 5 (of 5 total)