Support » Plugin: Better Search Replace » Plugin failure on wp_options table

  • bojanjosifoski

    (@bojanjosifoski)


    Hi,

    So I’ve been using this plugin for ages now and it’s been super cool all the time. So thank you for that.

    However, there seems to be an issue on one site that I am trying to change URLs on.

    When I run the plugin against the wp_options table that is around 1.5MB in the plugin outputs a 500 error. So I dug into the plugin and I was able to output the data in an error txt file to locate why the issue is happening.

    So I changed the Max Page Size to only 1 and also edited the /includes/class-bsr-db.php file on line 220 to insert my debugging code:

    if($row[‘option_name’] == ‘uninstall_plugins’){
    continue;
    }
    $file = plugin_dir_path( __FILE__ ) . ‘/errors.txt’;
    $current = file_get_contents($file);
    ob_start();
    var_dump($row);
    $ott = ob_get_clean();
    $current .= $ott.”\n”;
    file_put_contents($file, $current);

    So this code above outputs the rows that are processed by the plugin for example:

    array(4) {
    [“option_id”]=>
    string(6) “105296”
    [“option_name”]=>
    string(30) “_transient_w3tc.verify_plugins”
    [“option_value”]=>
    string(1) “1”
    [“autoload”]=>
    string(2) “no”
    }

    But when the plugin gets to this option name “uninstall_plugins” it basically is unable to process the data, now I overcome the issue by skipping just that option.

    Here is the data that is in that table

    O:8:”stdClass”:3:{s:9:”lastCheck”;i:1572007478;s:14:”checkedVersion”;s:6:”3.2.10″;s:6:”update”;O:8:”stdClass”:9:{s:2:”id”;i:0;s:4:”slug”;s:7:”aioseop”;s:7:”version”;s:6:”3.2.10″;s:8:”homepage”;s:26:”https://semperplugins.com/”;s:6:”tested”;s:5:”5.2.4″;s:12:”download_url”;s:78:”https://semperplugins.com/store/receipt/?duid=dda92c5e327223ecbf7d90ae7c6a4447″;s:14:”upgrade_notice”;s:26:”Improvements and bug fixes”;s:8:”filename”;s:47:”all-in-one-seo-pack-pro/all_in_one_seo_pack.php”;s:12:”translations”;a:0:{}}}

    I just want to know why its craching only on this, is there something wrong in the serialized data?

    Thanks!

  • You must be logged in to reply to this topic.