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 id_dsa.pub.  
 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/id_dsa.pub. 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 'id_dsa.pub' 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  

where,
  • 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:

https://apps.ubuntu.com/cat/applications/precise/putty/

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:
 dconf-editor  
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 'config.inc.php' file located inside '/etc/phpmyadmin/config.inc.php' 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 Administrator password for your Drupal 7 Site you can try the following command in Drush to recover it:

 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 other user try the following:

 drush uli some-username  

This will generate one time login link for that user.

Also you may try the method below:

 $ drush help user-password  

(Re)Set the password for the user account with the specified name.

Examples:

 drush user-password someuser --password="pass123"   

Sets the password for the username someuser.

Arguments:
 - name The name of the account to modify.
 - Options: --password= The new password for the account. Required.
 - Aliases: upwd

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. www.example.com (Main Site)
2. www.abc.example.com (Multisite 1)
3. www.123.example.com (Multisite 2)

& you would like to rebuild the registry for Site #2 viz. www.abc.example.com.

So your folder structure for the websites below might be something like:
 /var/www/html/www.example.com  
 /var/www/html/www.example.com/sites/abc.example.com  
 /var/www/html/www.example.com/sites/123.example.com  

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.

Change
 define('DRUPAL_ROOT', define_drupal_root());  
to
 define('DRUPAL_ROOT', $_SERVER["DOCUMENT_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 abc.example.com and access it as below in your browser:
 http://abc.example.com/sites/abc.example.com/registry_rebuild/registry_rebuild_multisite.php  

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/example.com.  
 Bootstrapping to DRUPAL_BOOTSTRAP_SESSION  
 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/example.com  
and not
 DocumentRoot /var/www/html/example.com/sites/abc.example.com  

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.

SAVE & RESTART:
 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:
 [Profile]  
 name=On Demand High  
 minfreq=40%  
 maxfreq=100%  
 policy=ondemand  
 [/Profile]  
 [Profile]  
 name=On Demand Low  
 minfreq=20%  
 maxfreq=80%  
 policy=ondemand  
 [/Profile] 

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 Magento Hosting:

Top 5 Posts (Weekly)

Lets Connect: