WordPress.org

Ready to get started?Download WordPress

Forums

You do not have sufficient permissions to access this page (4 posts)

  1. Speed_FANat1c
    Member
    Posted 2 years ago #

    Hello,

    I see there are such questions with this error, but I cannot find the answer which fits me, I think it would be faster if you would check the code:

    <?php
        /*
        Plugin Name: Table prefix renamer
        Description: Plugin, which renames database table prefixes
    	Plugin URI: http://www.orangecreative.net
        Author: Darius
        Version: 1.0
    	Author URI: http://www.orangecreative.net
        */  
    
    function tabren_admin() {
    	die('test');
    	//include('tabren_import_admin.php');
    	echo 'test';
    }
    
    function tab_pre_renamer_admin_actions() {
        add_options_page("Table prefix renamer ", "Table prefix renamer", 1, "Table prefix renamer", "tabren_admin");
    	//die('te4st');
    }  
    
    add_action('admin_menu', 'tab_pre_renamer_admin_actions');
    
    ?>

    Here is the plugin file. The menu in the admin section renders well, but when I click on that menu item, I don't even get message 'test'. I get: 'You do not have sufficient permissions to access this page.'

    Could hyou tell what is wrong?

    I am using win7 and xampp. Can this be something with file permissions? I think on localhost on windows, file permissions always are ok, at least I don't remember that I need to change them for other projects.

  2. Speed_FANat1c
    Member
    Posted 2 years ago #

    ALso I tried this code on another wordpress instalation - the same - can't access.

  3. Speed_FANat1c
    Member
    Posted 2 years ago #

    I am doing this based on this tutorial:

    http://net.tutsplus.com/tutorials/wordpress/creating-a-custom-wordpress-plugin-from-scratch/

    and tried to donload the source code from this tutorial page, installed, and also get the same effect. So maybe the problem is that this tutorial is too old.

  4. Speed_FANat1c
    Member
    Posted 2 years ago #

    found:

    add_options_page("Table prefix renamer ", "Table prefix renamer", 1, "Table_prefix_renamer", "tabren_admin");

    I had to remove spaces in 4th parameter.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.