The Bootstrap Framework

Guest post by Lisa Smith

Why settle with the ‘routine’ web development platform when you have Twitter Bootsrap, the all new buzzing platform for creating superb websites! Websites built using Twitter Bootstrap are fully responsive and load perfectly on devices with varying screen sizes. Moreover, your Bootstrap based web pages will be perfectly compatible with all browsers. All these features make Bootstrap the go-to choice for all contemporary web development projects. Common CSS components including print media styles, codes, grids, forms and buttons; Design and page building components like navbars, button groups, glyphicons, Javascript assets like modals and carousals apart from drop downs and tooltips, and basic plus responsive utilities – these digital assets make Bootstrap a fully loaded web design and development platform for you.

The Infographic is the courtesy of Bootstrap Templates

Bootstrap Powerful Front-end Mobile First Framework

Magento Blank Page Issue Fixed

After a recent upgrade from Magento Community Edition 1.9.0.1 to 1.9.1.0, I started noticing blank pages in the admin section (backend only) after certain functions: order entry, email tracking information, order comments. I also noticed no emails were sent out after password reset requests on the front end. I checked /var/log/maillog and didn’t see the messages. However I confirmed SMTP was working.

So, must be code related, I thought. Step 1 in my troubleshooting usually starts in /var/log/httpd/error_log. Upon review I noticed the following:

[Fri Mar 27 12:55:37.491424 2015] [:error] [pid 9974] [client xx.xxx.xxx.xxx:55842] PHP Fatal error: Call to undefined function mb_convert_encoding() in /var/www/html/magento/lib/Pelago/Emogrifier.php on line 556, referer: http://domain/index.php/admin/sales_order_shipment/view/shipment_id/936/key/...

Because I just upgraded, I had a fresh tar ball of my 1.9.0.1 build from the day prior. I ran a diff on the old version and the new version. One of the differences is this file:

$mage/lib/Pelgro/Emogrifier.php

This lib was not in my 1.9.0.1 build. This is new to Magento Community Edition 1.9.1.0.

Apache
This php file was failing to fully execute because of a missing php library (thank you @benmarks). I quick review of phpinfo(); showed I did not load mbstring in php.ini. After installing php-mbstring and restarting Apache, all email functions were confirmed working and the blank page issue went away.

Update a MySQL table from the command line (find and replace)

I thought this might be helpful to some of you out there, as I routinely have to do this myself. Need to update a table, or a lot of rows of data in MySQL? Here is a handy Find and Replace SQL script to run at the command line.

mysql> update TABLENAME set FIELDNAME  = replace(FIELDNAME, 'X','Y');

In the above example, X is the existing text and Y is the new text you want to replace with. Have fun!

How to change timezone on a Linux server (CentOS)

We run CentOS for many of our server builds and this question often comes up. Hope this helps.

Here are the steps:

  1. Make a backup copy of the default localtime file.
  2. [code]
    mv /etc/localtime /etc/localtime.bak
    [/code]

  3. Create a symbolic link to a new localtime file
  4. [code]
    ln -s /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
    [/code]

Be sure to replace “America/Los_Angeles” with the directory (if your zone has one) and filename of the timezone you want to use. Then test your change by running the command “date” from the command line.

Use rsync to transfer files between Linux servers

We use rsync to transfer files across servers and to assist with a variety of tasks associated with backup and restore. We found this great tutorial over at Nixcraft. Check it out. They do a great job of explaining advanced uses of rsync.

In a nutshell, this is one of the most useful commands we use and thought we would share with you.

[code]
# copy files from server1(local) to server2

rsync -avz /var/www/html/* user@server2.com:/var/www/html/

[/code]