Sunday, July 28, 2013

WordPress: "You do not have sufficient permissions to access this page"



To fix this issue, simply add or edit values in wp_usermeta table.


If you are in CPanel:

  • Login to your CPanel -> Databases -> then click phpMyAdmin 








  •  Select your website database in the left drop down box. (see sample below)





  • Next is click on the wp_usermeta table 
  • Click on the insert tab or edit the information if already exist, make sure you have edit only those have same user_id with your login creds.
    • unmeta_id - Leave it blank (it will be auto-generated). 
    • user_id - This is the user id of your account. 
    • meta_key - insert this value wp_capabilities 
    • meta_value - insert this value a:1:{s:13:"administrator";s:1:"1";}
      
                NOTE: Please be careful in using curly quotes. 
           a:1:{s:13:"administrator";s:1:"1";}is different from a:1:{s:13:”administrator”;s:1:”1″;}

Saturday, January 19, 2013

How to Install Java (OpenJDK) on Ubuntu


Before proceeding the installation, check first the existing Java installed in your system.

$ sudo java -version

 Once confirmed that there is an existing different version of Java installed, then execute the command below.

$ sudo update-java-alternatives -l
The command will show you the list all installed java packages.

Proceed with the installation of OpenJDK if they are yet in the list of the installed java packages.
 
$ sudo apt-get install openjdk-6-jdk

Verify if OpenJDK was successfully installed.

$ sudo apt-cache search openjdk

Since the system has more than one version of Java installed, then configure Java and set OpenJDK as the system use by executing the following command.

$ sudo update-alternatives --config java
You will be prompted with the choices e.g.
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                      Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      auto mode
  1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/java-6-sun/jre/bin/java       63        manual mode

Press enter to keep the current choice[*], or type selection number: 0

Check again the version and that's it!