Sunday, June 4, 2017

Updating Magento 2.1.x to a Newer Version

To update Magento 2.1.x to a newer version, say your current Magento installation is version 2.1.2 Community Edition, and you would like to update your Magento to the latest version 2.1.3 Community Edition, then use the following commands. Firstly open up your terminals and execute command as below:

Note: Don't use sudo while using composer for the reasons best explained here: http://bit.ly/2rDTRPk

 composer require magento/product-community-edition 2.1.3 --no-update  
 composer update  
 rm -rf var/di/* var/generation/*  
 php bin/magento cache:clean  
 php bin/magento cache:flush  
 php bin/magento setup:upgrade  
 php bin/magento setup:di:compile  
 php bin/magento indexer:reindex  

Same method can be applied for Updating Magento from:
  • Magento 2.1.3 to Magento 2.1.4
  • Magento 2.1.4 to Magento 2.1.5 and so on...

Friday, June 2, 2017

[SOLVED] - Unable to Delete Messages in Thunderbird Email Client

If you cannot delete messages in Thunderbird, it may be caused by a corrupted trash folder.

Here is how to delete the corrupted trash folder and create a new one:
  1. First, open your Profile folder:
     
    • At the top right of the Thunderbird window, click the menu button 
      New Fx Menu , then select Help, and then Troubleshooting Information. The Troubleshooting Information tab will open.
    • Under the Application Basics section, click on Open Directory. A window with your profile files will open.
  2. Close Thunderbird.
     
  3. Open the Mail (or ImapMail) folder in your file manager (according to whether you are using POP or IMAP with the affected account).
     
  4. Open the folder with your incoming mail server name (something like imap.googlemail.com or pop.googlemail.com).
     
  5. Select the Trash and Trash.msf files and delete them. In some accounts, these may be named Bin or Deleted.
     
  6. Restart Thunderbird.
     
    • If you are using IMAP, a new Trash folder will be automatically created by Thunderbird.
    • If you are using POP:
       
      1. In the folder list, right-click on your account name and select New Folder....
         
      2. Enter Trash as folder's name and confirm by clicking on Create Folder.
The trash will reappear and you will be able to delete mail again.

Source: https://support.mozilla.org/en-US/kb/cannot-delete-messages

Saturday, May 27, 2017

[SOLVED] - VirtualBox Not Updating Due To Error "Breaks existing package..."

The 'Breaks existing package' error usually happens when you are trying to update VirtualBox from say version 5.0.x to 5.1.x. To resolve this issue you will first have to uninstall VirtualBox. Open your terminal and enter the commands below:

 sudo apt-get purge virtualbox-*  

Now install VirtualBox using the code below. But first find the version number of the latest VirtualBox package available by visiting the following page: https://www.virtualbox.org/wiki/Downloads. When I checked the latest VirtualBox version available was: VirtualBox 5.1.22.

 sudo apt-get update  
 sudo apt-get install virtualbox-5.1.22   

After upgrading VirtualBox you will also have to update your Extension Pack. You can download the Extension Pack from the aforementioned page.

[SOLVED] - VirtualBox Not Updating Due To Error "Breaks existing package..."

Thursday, May 18, 2017

[SOLVED] - Disable Merged CSS & JavaScript using phpMyAdmin in your Magento Installation

If your Magento site is malfunction because of enabling CSS & JavaScript merging and minification, then you can apply the solution explained in the following page: https://magento.stackexchange.com/questions/80765/how-do-i-disable-merged-css-and-js

Monday, May 15, 2017

[SOLVED] - Unable to find expected entry 'universe/source/Sources' in Release file (Wrong sources.list entry or malformed file)

Because of repeatedly getting the following error,
 W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release  Unable to find expected entry 'universe/source/Sources' in Release file (Wrong sources.list entry or malformed file); I was unable to update my source list and thus unable to install softwares from the terminal. Finally, today I managed to solved this issue and also was able to update my apt source list.

1. Open your Unity Dash & type update & select 'Softwares & Updates' as shown in the image below:

Solve - Wrong sources.list entry or malformed file issue
Click image to enlarge
2. Click 'Download from' and choose 'Other'


3. Click 'Select Best Server'. Ubuntu will take some time to select the best server for you. Accept it.

4. Now try running the software update again. It should work.

5. If it does not go through steps 1-4 again. This time Ubuntu will (hopefully) select a different server as the 'Best server'. Try software update again.
THE KEY IS TO CHANGE THE DOWNLOAD SERVER FROM WHERE UBUNTU UPDATES ITSELF.

- With inputs from: https://askubuntu.com/questions/383644/how-to-solve-wrong-sources-list-entry-or-malformed-file/795941

Thursday, May 11, 2017

[SOLVED] - Web Setup Wizard/Component Manager Not Working - Magento 2

The first thing you need to do when you are unable to access your Component Manager page in your Magento 2x installation is to press F12, Click on Console & view the error message displayed there. Please look at the image below:

[SOLVED] - Web Setup Wizard/Component Manager Not Working - Magento 2
Click on image to enlarge
The message displayed in red are the error messages(s). With this error message in hand you will begin to get some idea about the direction you need to take to troubleshoot.

[SOLVED] - Web Setup Wizard/Component Manager Not Working - Magento 2
Click on image to enlarge
In my case, I copied the link that was causing the Error & tried to view it in the browser. When I did that I got new error messages generated as below:

Click on image to enlarge
This was the error I was getting precisely:

[RuntimeException]                                                                                                                                                                                                      
  Failed to execute git clone --mirror 'git@github.com:rusdragos/m2-weltpixel-backend.git' '/var/www/html/var/composer_home/cache/vcs/git-github.com-rusdragos-m2-weltpixel-backend.git/'  
                                                                                                                                                        

I checked the 'composer.json' file in the Magento root directory and found the above git command and simply removed it. & voila!, my problem got solved.

Wednesday, May 10, 2017

Carriage returns in PHP

Carriage return is "\r". Mind the double quotes!

If you want to put a line break in your text, while using PHP, and want to render it correctly in different operating system:
  • Mac: \r
  • Linux/Unix: \n
  • Windows: \r\n

Friday, May 5, 2017

Eclipse Lagging While Typing PHP Codes, Java Codes etc in Windows or Linux

If you are experiencing lag and delays while typing your codes in the Eclipse IDE the following simple change in your settings will resolve the issue.

1. Goto Windows
2. Goto Preferences
3. Then suppose you want to resolve the issue for PHP, select PHP
4. Under PHP >> Editor
5. Under PHP >> Editor >> Content Assist
6. Deselect the option 'Enable auto activation', or
7. You may increase the 'Auto activation delay'

Please refer image below if you are still unclear with the above steps:

Eclipse Lagging While Typing PHP Codes, Java Codes etc in Windows or Linux
 

Sunday, April 23, 2017

[SOLVED] - Connecting to Amazon EC2 Instance from Terminal in Ubuntu using SSH

This tutorial shows you how to connect to your Amazon EC2 Instance from your Ubunut's terminal/CLI by making use of SSH.

NOTE: if you have not installed a tool like OpenSSH in your Ubuntu system you may do so by checking out the following tutorial: http://linux-sys-adm.com/how-to-install-and-configure-ssh-on-ubuntu-server-14.04-lts-step-by-step/ or use a tool like PuTTY.

1. First down the EC2 Key Pair Private Key for your EC2 instance. To generate Key Pair, you may check the following tutorial: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html

2. Copy the Key pair (.pem) key to the location of your choice and make note of the location path. In my case, I created a folder called 'aws-keys' under my 'home' directory and placed the '.pem' file there.

3. Open your terminal & change the file/folder permission to 600 where you have stored your '.pem' key, else you will get an error as shown in the image below:

Click image to enlarge
NOTE: since you have changed 'file permission' to 600, you will have to use sudo.

 $ sudo chmod -R 600 aws-keys  

 4. Now enter the following commands to connect to your AWS EC2 Instance:

 sudo ssh -i file_name.pem ec2-user@<publicDNS>  

You can find your publicDNS in your EC2 Dashboard. Please refer image below:

Click image to enlarge
If login is successful you will see a message similar to the one show in the image below, depending upon your Amazon Machine Image (AMI).

Click image to enlarge

Uninstalling LibreOffice from Ubuntu using Terminal/Command Line

Please follow the instruction below to Uninstall LibreOffice from your Ubuntu system:

 sudo apt-get remove --purge libreoffice*  
 sudo apt-get clean  
 sudo apt-get autoremove  

Installing LibreOffice in Ubuntu from .deb Packages using Terminal

This tutorial will show you how to install the latest version of LibreOffice in your Ubuntu system. If you haven't downloaded the latest build for LibreOffice, go ahead do it at: https://www.libreoffice.org/download/download/.

1. When you unpack the downloaded archive, you will see that the contents have been decompressed into a sub-directory.

2. Now,change directory to the one starting with "LibreOffice_", followed by the version number and some platform information. Example:

 $ cd LibreOffice_5.3.2.2_Linux_x86-64_deb  

4. This directory contains a subdirectory called "DEBS". Change directory to the "DEBS" directory.

 $ cd DEBS  

5. Now open your terminal (CTRL+ALT+T) and enter as below.The following commands will install LibreOffice and the desktop integration packages (you may just copy and paste them into the terminal screen rather than trying to type them):

 $ sudo dpkg -i *.deb  

The installation process is now completed, and you should have icons for all the LibreOffice applications in your desktop's Applications/Office menu. You may also open your Unity Dash & start LibreOffice from there.

To uninstall LibreOffice,

Please check my other tutorial at: http://www.evagabond.me/2017/04/uninstalling-libreoffice-from-ubuntu.html

Friday, April 7, 2017

Lesson 1- Introduction to Amazon Elastic Compute Cloud (EC2)

This video gives you a clear understanding of the basics of Amazon EC2 web services.

Sunday, March 26, 2017

[SOLVED] - Add Currently Logged in User to Apache User & Group [www-data:www-data]

If you are experiencing permission issues with your web directories and files, use the following commands to resolve it, This solution is very helpful if you are trying to run Wordpress/Other CMS in localhost environment:

1. Adds the currently logged in user to the www-data group.

 sudo usermod -aG www-data $USER  

2. Changes the ownership of the /var/www directory to www-data group.
 sudo chown -R www-data:www-data /var/www directory_name

3. Sets the proper permissions so you can upload files via sftp, manage files via command-line, and upload plugins and media directly in WordPress.
 sudo chmod -R 774 /var/www directory_name

Saturday, March 11, 2017

How to Zip/Compress files using Terminal in Ubuntu/Linux

Use the following commands to compress your files using terminal. First, make sure you have Zip already installed in your system.

>> To install Zip: Open you terminal (CTRL+ALT+T) and enter the command below:
 sudo apt-get install zip gzip tar  

>> To Zip:
 zip -r compressed_filename.zip foldername  

where:
  • r: recursive
  • compressed_filename.zip: filename of the compressed-file that you are creating
  • folder_name: filename of folder that you want to compress
Seems to be much faster and consume almost 80%-90% less CPU processes than the one using GUI/Archive Manager.; but file size seems to be large by 10-20 MB than the one created using the menu option available in GUI/Archive Manager.

>> To Unzip:
 unzip my_arch.zip  

Zip stores relative path names by default. There are several parameter-options available for zip. For that read: the manual (man zip). For a starting this will do.

Most often you will see .tar.gz endings in linux-world. That's the product of two tools: TAR (the tape archiver) and GZIP (the GNU-Zip). Tar has got the call option to automatically gzip/gunzip files after "taring".
 tar -cvzf may_arch.tar.gz my_folder  

where:
  • -c means "create"
  • -v means "verbose" (sometimes bothersome and slowing down...)
  • -z means "use (GNU)zip"
  • -f XYZ declares the name of the output file. (You should chose a helping name like XYZ.tar.gz)
There may also be .tar.bz2 endings. This is the product of the -j parameter instead of the -z parameter: you will choose compression with BZIP2 (-> man bzip2).

To extract you simply use -x (eXtract) instead of -c (Create):
 tar -xvzf may_arch.tar.gz  

Wednesday, March 8, 2017

[SOLVED] - W: GPG error: .. The following signatures were invalid: BADSIG ... Ubuntu Extras Archive Automatic Signing Key

While trying to UPDATE/UPGRADE your Ubuntu system from the terminal, you might be bumping, time and again into what is called the BAD SIGNATURE error. Something like this:

W: GPG error: http://01.archive.ubuntu.com trusty Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key <ftpmaster@ubuntu.com>

To solve the bad signature error in your Ubuntu Installation try the following solution:
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys your_key_number  
 Example: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192  
Rebuild your software cache:
 sudo apt-get clean   
 cd /var/lib/apt   
 sudo mv lists oldlist   
 sudo mkdir -p lists/partial   
 sudo apt-get clean   
 sudo apt-get update  
If the above solution doesn't work, you may try the solution below:
 $ sudo -i  
 # apt-get clean  
 # cd /var/lib/apt  
 # mv lists lists.old  
 # mkdir -p lists/partial  
 # apt-get clean  
 # apt-get update  

Sunday, February 26, 2017

Enabling Multi-byte UTF-8 support in Drupal 7

This tutorial explains the various steps to enable Multi-byte UTF-8 support in Drupal 7. It's a very simple and straightforward process and if implemented rightly, you can easily convert your 'character set' & collation to

According to this post in drupal.org, multi-byte UTF-8 support for MySQL and other database drivers, allows emojis, Asian symbols, mathematical symbols, etc with your Drupal 7 installation. The only caveat to this is that your Drupal installation must be at least Version 7.50 or higher.


Requirements:
  •  Drupal: Version 7.50 or above
 Initially when you check your Drupal Site Report at: admin/reports/status, you will see a message similar to the image below:

Click on image to enlarge

 The steps below have been compiled from the following post at drupal.org: https://www.drupal.org/node/2754539

For MySQL

1. In order to be able to use this, the following requirements must be met:

In order to allow for large indexes, MySQL must be set up with the following my.cnf settings:

 [mysqld]  
 innodb_large_prefix=true  
 innodb_file_format=barracuda  
 innodb_file_per_table=true  

These settings are available as of MySQL 5.5.14, and are defaults in MySQL 5.7.7 and up.

After editing the my.cnf file (often located at /etc/mysql/my.cnf), don't forget to restart the mysql service (for example, with the command sudo service mysql restart) in order to load the new configuration.

2. The PHP MySQL driver must support the utf8mb4 charset (libmysqlclient 5.5.3 and up, as well as mysqlnd 5.0.9 and up).

3. The MySQL server must support the utf8mb4 charset (5.5.3 and up).

Run the command mysql --version to see your current MySQL version.

Steps to enable 

 

For existing Drupal installations
  • First, back up your database and convert all existing tables to utf8mb4, such as by using the drush command provided by the utf8mb4_convert contrib project.
     
  • Set the "charset" and "collation" keys on the database connection array in settings.php to "utf8mb4" and "utf8mb4_general_ci" respectively:

     $databases['default']['default'] = array(  
      'driver' => 'mysql',  
      'database' => 'databasename',  
      'username' => 'username',  
      'password' => 'password',  
      'host' => 'localhost',  
      'charset' => 'utf8mb4',  
      'collation' => 'utf8mb4_general_ci',  
     );  
    

 For new Drupal installations

  • Prior to running the installer, edit settings.php and manually add in the full database settings array code, with 'charset' as 'utf8mb4', and 'collation' as 'utf8mb4_general_ci', and with the actual values for 'database', 'username', 'password', 'host', as shown below:

     databases['default']['default'] = array(  
      'driver' => 'mysql',  
      'database' => 'databasename',  
      'username' => 'username',  
      'password' => 'password',  
      'host' => 'localhost',  
      'charset' => 'utf8mb4',  
      'collation' => 'utf8mb4_general_ci',  
     );  
    

  • Then run the installer specifically by accessing install.php, as in http://example.com/install.php (not just http://example.com/)

Other database systems


  • PostgreSQL and SQLite support 4-byte UTF-8 out-of-the-box, so no special changes are needed for these.
  • MariaDB and other MySQL equivalents should likely work with similar instructions as above for MySQL.
  • Database drivers provided by contributed modules may or may not support this feature. The best place to look for answers is the issue queue of the contributed module which provides the database driver you are using.
Now when you look at your Drupal Site Report, you should be getting a warning message as the image below, which is related to Database 4 byte UTF-8 support:

Click on image to enlarge 

Converting Characterset & Collation to utf8mb4:

Using SQL commands:

 ALTER DATABASE db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;  
 ALTER TABLE tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;  

Or if you're still on MySQL 5.5.2 or older which didn't support 4-byte UTF-8, use utf8 instead of utf8mb4:

 ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_unicode_ci;  
 ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;  

 

Easier way using Drush:


Now to convert all your database tables to utf8mb4 characterset and utf8mb4_general_ci collation, you may make use of the following Drush command called UTF8MB4 Convert. Please find detailed instructions of this command here: https://www.drupal.org/project/utf8mb4_convert.

The conversion process in your terminal after executing the above commands should be as below:

Click image to enlarge
 Final Message After Conversion:


Click image to enlarge
Finally when all your tables are converted, you can view each of their's Collation by using any database management tool such as phpMyAdmin. 

 
Click image to enlarge

Finally your Drupal site should display a message like this, confirming successful enabling of  Multi-byte UTF-8 support.

Click image to enlarge
 That's all there is to enable multi-byte UTF-8 support in Drupal 7.

Wednesday, February 22, 2017

Redirect One URL To Another URL Using htaccess in Magento and Other Websites

Below is the technique which you can use to redirect a URL to another URL using htaccess in Magento or various other websites.

 Redirect 302 /en/php/index.php http://www.example.com/newpage.html  

Note: A 301 redirect means that the page has permanently moved to a new location. A 302 redirect means that the move is only temporary. Search engines need to figure out whether to keep the old page, or replace it with the one found at the new location. So, if your link has changed permanently then go for 301 redirect else go for a 302 redirect.

For various other redirect techniques you may check the link below:

http://bit.ly/2l91rf5

सिक्नुहोस - मोबाइल फोनलाई FAST बनाउने र MEMORY SPACE बढाउने टेकनिक



Learn how to make your mobile fast and increase your memory space in your Android phones.

Sunday, February 5, 2017

Word Wrapping/Line Wrapping in Geany

If you are looking to line wrap or word wrap your codes in Geany use the following keys combinations:

Press ALT+D +L to toggle Line wrapping or Word wrapping.

Friday, February 3, 2017

Reset Product ID to One (1) in Magento 2x

If you have deleted your sample products and would like to reset the product id to one (1) or any number of your choice, open up your phpMyAdmin or any MySQL client of your choice and enter the following command:

 ALTER TABLE `catalog_product_entity` AUTO_INCREMENT =1  

If you have used table prefix don't forget to append that as well before catalog_product_entity. Example: table-prefix_catalog_product_entity.

Monday, January 23, 2017

Product Automatically Converting To Virtual Product Instead of Simple Product in Magento

If you are experiencing a queer problem where by your products are automatically converting to virtual product instead of the default simple product then one of the reason might be —while creating the product, under the weight field you might be selecting the option - 'This item has no weight.' & when you do this Magento saves the products as virtual product. To save a product as simple product you must select the option as 'This item has weight.'

In case you have lots of product that are virtual and you would like to convert them to simple products, you can run this simple SQL query as below:

 UPDATE catalog_product_entity SET type_id = 'simple' WHERE type_id = 'virtual'  

product-automatically-converting-simple-product-virtual-product

Saturday, January 7, 2017

Marketplace or Multi Store/Multi Website Solution in Magento 2 - Know which to use

Just like I had been all this while, you too must be confused between Marketplace or Multi Vendor/Multi Website solution, and unable to make your choice. In this post I will explain to you as to whether you should go for a Marketplace or Multi Store/Multi Website solution. There can be many reasons, but the ones below, were the ones that made me eventually go for a marketplace, in spite of successfully building a Multi Vendor Solution.

1. Marketplace: You should go for a marketplace solution if you are looking to provide the following features/services in your website:
  • Multi Vendor Solution
  • Ability for users to register as vendors and start selling their products on your website. All this can be done from your site's frontend which isn't the case with Multi Store/Website.
  • Amazon/Ebay kind of solution
Fig: Multi Website/Multi Store (click on image to enlarge)

 2. Multi Store/Multi Website: You should go for a multi store/multi website solution in the following case:
  • Use a single Magento installation to create several stores & websites which eases website maintenance related tasks.
  • The following features are shared in a multi store setup:
    • Payment Gateway (shared)
    • Shipment (shared)
    • Category (optional)
    • Catalog is shared or not shared depending upon how you have set up your Category. If you have same category for all the stores then the products will be shared between all the stores. If you have separate categories for separate stores then the product can be restricted to each store. 
    • Users are shared across all the store enabling single account log in across stores.
  •  The following features are shared/not shared in a multi website setup, depending upon your configuration:
    • Payment Gateway (Can be unique for each website)
    • Shipping (Can be unique for each website)
    • User account (Can be restricted or shared across websites depending upon your configuration)

Top Magento Hosting:

Top 5 Posts (Weekly)

Lets Connect: