Search blog

Saturday, May 30, 2015

'Fatal error: Call to undefined function content_taxonomy_allowed_values()

If you are getting the following error:

'Fatal error: Call to undefined function content_taxonomy_allowed_values() in /modules/taxonomy/taxonomy.module on line 1496'

one of the reason might be you have disabled the Taxonomy and Content Taxonomy modules. Just check whether that's the case, if so, re-enable those modules and your problem should be resolved.

[Solved] Configure SSH, PuTTy in Ubuntu 14.04, 14.10, 15.04 to Connect from Localhost to Remotehost

Solutions to Successfully connect to a remote server using SSH in Ubuntu & cPanel account

After fiddling around with a lot of this and that the solution below is what eventually worked for me. I tried PuTTY SSH client and all that but eventually I found it simple and best to use the default Ubuntu Terminal. Anyway PuTTY is just a GUI client which you use instead of using the Terminal.

1. Generate SSH Key in Linux

Open your terminal and enter the following commands:
 $ ssh-keygen -t dsa  

You should get the output as below:
Note: When asked to enter file name simply hit enter without enterning any file name so that your file is named 'id_dsa' automatically.

Then enter  a strong passphrase and make sure you remeber it for future use.
 Generating public/private dsa key pair.  
 Enter file in which to save the key (/home/user/.ssh/id_dsa):  
 Enter passphrase (empty for no passphrase):  
 Enter same passphrase again:  
 Your identification has been saved in id_dsa.  
 Your public key has been saved in  
 The key fingerprint is:  
 11:2e:e8:b2:1d:c9:b9:cf:76:9a:b3:3a:c1:1f:95:93 user@localhost  

This will create a private key written to /home/user/.ssh/id_dsa and a public key written to /home/user/.ssh/ The passphrase is used to protect your key. You will be asked for it when you connect via SSH.

 2. Upload Public Key to your cPanel Account

Open the file '' in a text editor like Gedit and copy it's content.

Now log into your cPanel Account, Open SSH/Shell Access and Paste as shown in the image below.

If you don't do this you will get an error saying 'Permission denied (publickey).'

3. Time to Connect to your Remote Server Account

Now load your private SSH key using the following command:
 $ ssh-add /home/user/.ssh/id_dsa  

When asked to enter the passphrase enter the passphrase that you have set during the generation of the SSH key.

Now initiate your SSH connection by using the following commands:

 $ ssh Username@Hostname -pPort_Number  

  • Username is your cPanel username or Webhost Account Username
  •  Hostname can be your server's IP address or domain name or your server's name
  • Port_Number is default is '22' or could be something like '18765' as set by my Webhost Provider.
Press "Enter" and if everything has been set up properly, you will establish an SSH connection to your account.

Friday, May 29, 2015

Install PuTTY SSH Client on Ubuntu 14.04, 14.10, 15.04

I tried installing PuTTY in Ubuntu under Wine Version 1.7.38 but everytime I tried to execute it from the Terminal I was getting the following error:

'wine: cannot find L"C:\\windows\\system32\\putty.exe"'

So after some searching I found out that it can be easily installed from the Software Center. Just click on the link below and download it:

Friday, May 22, 2015

Disable Show Hidden Files in Ubuntu

Somehow my 'Show Hidden Files' options seems to have become the default selection and hence everytime I opened my Files (Nautilius) all my Hidden files were being revealed. To fix it this is what I did:

1. Open Terminal and type:
Enter and then in the window that has opened make the following Selection:
Goto org->gtk->settings->file-chooser
& UNCHECK show-hidden

Monday, May 18, 2015

Increasing the Script Timeout Limit in phpMyAdmin in Ubuntu 15.04 and other LAMP Servers

If you are facing problems importing your database dump into your  MySQL server using phpMyAdmin follow the steps below to resovle the issue:

Open the '' file located inside '/etc/phpmyadmin/' and add the following line:
 $cfg['ExecTimeLimit'] = 0;  

This will remove any time constraint in phpMyAdmin for database import.

Now make the following changes in your 'php.ini' file which is located at '/etc/php5/apache2/php.ini.' You will have to sudo and open your editor to make/commit the changes:
 post_max_size = 750M  
 upload_max_filesize = 750M  
 max_execution_time = 300  
 max_input_time = 540  
 memory_limit = 1000M  

Now finally restart your Apache Web Server:
 sudo service apache2 restart  

Thursday, May 14, 2015

[SOLVED] - How to RESET/CHANGE Administrator/Super User Password using Drush in Drupal 7?

If you have forgotten your Super Admin (SU) password of your Drupal 7 site, and want to reset it, you can use any one of the solutions to reset your password. Please note you will have to use Drush for the password reset process.

#Solution 1:
This will generate a one time login link. By default it provides one-time login link for administrator.
 drush uli admin-username  
This will generate a one time login link. By default it provides one-time login link for administrator. If you want to generate for one time login link for that user, try the following:
 drush uli some-username  

#Solution 2:
(Re)Set the password for the user account with the specified name.
 $ drush help user-password  
Sets the password for the username someuser:
 drush user-password someuser --password="pass123"   
NOTE: You can use upwd instead of user-password.
 drush upwd your-userid --password="new-password"  

Sunday, May 10, 2015

Correctly Using Registry Rebuild in a Multisite Installation with Drupal 7

If you have a multisite Drupal installation and need to run Registry Rebuild follow the instruction below. As the first line in the download page states, remember this is not a module and you can't enable it. And if rightly set you can rebuild your Registry with ease.

Download the files and place it inside the folder of the website whose registry you would like to rebuild. Say, suppose your multisite is as follows:

1. (Main Site)
2. (Multisite 1)
3. (Multisite 2)

& you would like to rebuild the registry for Site #2 viz.

So your folder structure for the websites below might be something like:

Extract and check the files inside your registry_rebuild folder. The file to note here is 'registry_rebuild.php.' Open it in an editor of your choice and make the following edit in line 10.

 define('DRUPAL_ROOT', define_drupal_root());  

This will help you get the appropriate Drupal Root for each of your multisites else you will get an error as below:
 Failure: Unable to discover DRUPAL_ROOT. You may want to explicitly define it near the top of registry_rebuild.php  

Now place the registry_rebuild folder that you just extracted inside the multisite folder whose registry you want to rebuild; in our case it's and access it as below in your browser:  

The process will take some time and you might just see a blank browser. Finally if your registry has been successfully rebuilt you should get a confirmation message as below:
 DRUPAL_ROOT is /var/www/html/projects/  
 Bootstrap caches have been cleared in DRUPAL_BOOTSTRAP_SESSION  
 Doing registry_rebuild() in DRUPAL_BOOTSTRAP_SESSION  
 Bootstrapping to DRUPAL_BOOTSTRAP_FULL  
 Rebuilding registry via registry_rebuild_cc_all in DRUPAL_BOOTSTRAP_FULL  
 All caches have been cleared with registry_rebuild_cc_all.  
 There were 616 files in the registry before and 616 files now.  
 All caches have been cleared with registry_rebuild_cc_all.  
 If you don't see any crazy fatal errors, your registry has been rebuilt.  

Now you should be able to access your site.

Note: Also if you are using VirtualHost then make sure your Document root is the path to the main site folder as below and not the multisite folders inside the 'sites' directory:
 DocumentRoot /var/www/html/  
and not
 DocumentRoot /var/www/html/  

Monday, May 4, 2015

How to Change Bluetooth Device Name in Ubuntu 15.04, Vivid Vervet

To change your default bluetooth device name 'ubuntu-0' to the name of your choice follow the steps below: Open Terminal (CTRL+ ALT+T) and execute the commands below:
 sudo gedit /var/lib/bluetooth/*/config  

Change the value of device name to the name of your choice.

 service bluetooth restart  

Sunday, May 3, 2015

Enable/Customize Startup/Login Sound in Ubuntu 15.05 (Vivid Vervet)

If you would like to enable or customize startup/login sound in Ubuntu 15.05 and have been looking for a workaround, follow the instructions below:

1. First open your Terminal and enter the following commands and change the value NoDisplay from true to false:
 gksudo gedit /usr/share/gnome/autostart/libcanberra-login-sound.desktop   

SAVE the file and EXIT.

2. Now OPEN Startup Applications by searching it in your Unity Dash (you can press the Windows key and search)

3. Once in Startup Application click on Add and then you may enter as below:
 - Name: Login Sound  
 - Command: /usr/bin/canberra-gtk-play --id="desktop-login" --description="play login sound" --volume=10  
 Comment: Play sound when I logs in 

Click on SAVE

4. To play a custom sound, install mplayer (Movie player for Unix-like systems), then type following in command area:

 mplayer /home/handbook/Music/Hello-Moto.mp3  

5. Finally, Logout/Login and Chec

[SOLVED] [UBUNTU 15.04 - Vivid Vervet] Change cpufreqd default to Ondemand from Performance

After installing cpufreqd on Ubuntu 15.04 I noticed that by default the mode being selected is 'Performance.' I wanted it to be 'On Demand' as used to be in earlier versions. If you want to change to 'On Demand' like me follow the steps below:

1. First go to '/etc/' and find the file 'cpufreqd.conf' and make a backup of it. To do so you can copy the file and paste it in your Desktop.

2. You can manually change to 'On Demand' mode entering the following command in your terminal:
 sudo cpufreq-set -c 0 -g ondemand  

But this is a temporary change. If your restart cpufreqd you will see that it reverts back to 'Performance.' Try it using the following command:
 sudo service cpufreqd restart  

So to make the change permanent goto Step 3:

3. Open your terminal (CTRL+ALT+T) and type the following command:
 sudo gedit /etc/cpufreqd.conf  

On line 4 & line 5 you should see a Note as below(to view line numbers in gedit, Click on Edit - Preferences - Under View - Check Display line numbers:
 # Note: ondemand/conservative Profiles are disabled because  
 # they are not available on many platforms.  

Now uncomment all the lines from line number 28 to line number 40 as below:
 name=On Demand High  
 name=On Demand Low  

Also uncomment the lines from line number 71 to 83.

In line 92 change 'Performance High' to 'On Demand High' as below:
 profile=On Demand High  

Now SAVE your file and RESTART as stated above.

You should now see that your cpufreq mode changes to 'On Demand' if it was in 'Performance' or continue to stay in 'On Demand' mode.

Top 5 Posts (Weekly)