WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WP Db Abstraction] You do not have sufficient permission

[Plugin: WP Db Abstraction] You do not have sufficient permission

Viewing 2 replies - 1 through 2 (of 2 total)
  • Edit: the installation procedure worked fine only with my code previously modified…without this modify the installation return some errors (see screen link) -> http://www.imagehost.it/di/PU4E/screen.jpg

    Evidently my edit does not work … but the plugin still does not work!

    I have modified in translations.php the function on_duplicate_key() as below:

    function on_duplicate_key($query){
    $query = str_replace(‘`’, ”, $query);
    if ( stripos($query, ‘ON DUPLICATE KEY UPDATE’) > 0 ) {
    $table = substr($query, 12, (strpos($query, ‘ ‘, 12) – 12));
    // currently just deal with wp_options table
    if (stristr($table, ‘options’) !== FALSE) {
    $start_pos = stripos($query, ‘ON DUPLICATE KEY UPDATE’);
    $query = substr_replace($query, ”, $start_pos);
    $values_pos = stripos($query, ‘VALUES’);
    $first_paren = stripos($query, ‘(‘, $values_pos);
    $last_paren = $this->get_matching_paren($query, $first_paren + 1);
    $values = explode(‘,’, substr($query, ($first_paren + 1),($last_paren-($first_paren + 1))));
    if (!isset($values[1])) {
    $values[1] = ”;
    }
    if (!isset($values[2])) {
    $values[2] = ‘no’;
    }
    // change this to use mapped fields
    $update = ‘UPDATE ‘ . $table . ‘ SET option_value = ‘ . $values[1] . ‘, autoload = ‘ . $values[2] .
    ‘ WHERE option_name = ‘ . $values[0];
    $update_new=’IF NOT EXISTS (SELECT * FROM ‘.$table.’ WHERE option_name=’.$values[0].’)
    INSERT INTO ‘.$table.’ (option_name, option_value, autoload) VALUES (‘.$values[0].’,’.$values[1].’,’.$values[2].’)
    ELSE
    UPDATE ‘.$table.’ SET option_value=’.$values[1].’, autoload=’.$values[2].’ WHERE option_name=’.$values[0];
    $this->following_query = $update_new;
    return $update_new;

    }
    }

    return $query;
    }

    …and now the installation procedure worked fine! The table “wp_options” has populated correctly (compared with previous table on MySql installation)…but the same error appears at the login with administrator profile:
    “You do not have sufficient permission to access on this page.”

    …can you help me please ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP Db Abstraction] You do not have sufficient permission’ is closed to new replies.