How to support Zurb Foundation 4 in IE8 and IE7

According to the Zurb Foundation 4 FAQ it is no longer supporting IE8 or IE7. This is unfortunate as you probably know, since you are reading this. Quite frankly I’m ready for IE8 to to the way of IE6 however as of the time that this article was written about 4.6% of internet users are still using IE8.

I’ll keep the rhetoric short however I believe in browser degradation (aka graceful degradation); ergo if you use an older browser that is out of date a site should still render and be navigable and display nicely but some of the features may be inaccessible. This is problematic since Zurb Foundation 4 only works for browsers that support media queries which IE8 and lower do not. So when you load a Zurb site in IE8 it defaults to the mobile view which looks quite ugly on a desktop, all of the elements are basically stacked vertically. In my opinion this is a huge design flaw, especially since IE8 alone is almost 5% of the browser market.

One fix I have seen is to load Foundation 3 for IE8 and lower and load Foundation 4 for everyone else. I contemplated this but it seems like a lot of work to just get a page to display nicely.

So I present the quick fix, a Zurb Foundation 4 patch for IE8 / IE7. This will get your content to display normally however it will not support any exotic features of Zurb such as the adjustable top-bar, menus etc. I don’t use too many exotic controls so I just hardcode their CSS on an as-needed basis.

IE8 / IE7 Zurb Foundation 4 Formatting CSS Fix

.large-1  { width: 8%;   }
.large-2  { width: 16%;  }
.large-3  { width: 25%;  }
.large-4  { width: 33%;  }
.large-5  { width: 41%;  }
.large-6  { width: 49%;  }
.large-7  { width: 58%;  }
.large-8  { width: 66%;  }
.large-9  { width: 74%;  }
.large-10 { width: 83%;  }
.large-11 { width: 91%;  }
.large-12 { width: 100%; }
float: left !important;

This is the gist of it, set the widths of the columns and then float the columns next to each other, worked like a charm! You should probably also wrap this code in an IE conditional statement so that it does not interfere with other browsers.

Using the html input placeholder attribute

I was pleasantly surprised to discover a little gem today. It is the placeholder attribute for a text input in HTML. As a developer we often have to add little hints for users as to what information they are supposed to enter into a form. Take for example a comment form and you want to indicate to a user that they should initiate typing in this field:

As soon as the user starts typing the placeholder text disappears and is replaced with the user’s entered text.

In the past I used to accomplish this with a couple lines of Javascript. Today however I discovered the placeholder attribute.

And voila your form now has placeholder text that is automatically handled by the browser with no need to manually handle the user events using Javascript.




PHP Configuration warning to set date.timezone or use date_default_timezone_set()

Today I am configuring various PHP versions on my Windows 8 Pro workstation. One of the first tests I run is to call phpinfo() in order to verify the installation is correct. After configuring Zend Server and testing it out I noticed that it was capturing the following error:

“phpinfo(): It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone.”

I ran into a similar issue recently with CakePHP tossing a similar warning. That solution is still valid for CakePHP, this solution appears to fix the issue globally since it will go in your main php.ini file. In mine I was able to find the date.timezone setting around line 920, your location may vary depending on modifications.

PHP provides a list of time zone codes you can use to set date.timezone. There is also an alternate list of PHP time zone codes. After you find your correct timezone just update your php.ini file, here is an example of how I set my date.timezone attribute.

date.timezone = US/Eastern

Don’t forget to restart your web server!


CakePHP Installation Warning strtotime() Not Safe To Rely On System’s Timezone

While setting up a new copy of CakePHP for the first time I encountered this PHP warning:

Warning: strtotime(): It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in C:\doocumentroot\blog.local_www\CakeBlog\lib\Cake\Cache\CacheEngine.php on line 60

I looked through the config files and did not find a variable named date.timezone. After a little bit of searching it appears that you need to uncomment line 242 in /app/Config/core.php which is responsible for setting the timezone offset. Here is the block of code you want to uncomment:

 * Uncomment this line and correct your server timezone to fix
 * any date & time related errors.

After uncommenting that line your warnings about strtotime() should go away.

Zend Server PHP Excecution Hangs In IIS

I recently setup Zend Server in order to run PHP applications. Since I already had IIS installed I decided that it would be much easier to continue using IIS instead of installing Apache separately. When you run IIS and Apache side by side you run into the inherent issue of sharing ports 80 and 443 with both servers.

If you are reading this I will assume that you know what the Zend Server is and what it does. The short version though is that it is a custom PHP implementation that you can use to debug and trace PHP applications.

So I installed the Zend Server onto IIS8 and everything went off without a hitch. One of the first things I will do when setting up a new system is to just write a quick test file. First test is a txt file in order to make sure the bindings are setup correctly and the server is listening. No problems there my test.txt file served up fine.

The next test is to server up an empty PHP file. This is where it got interesting. The request kept timing out. I double checked my PHP file and it was empty but the requests were still timing out.

After inspecting the Zend website setup I noticed that it was using the DefaultAppPool whereas the new website I had setup was using it’s own app pool. The solution to prevent Zend Server from hanging in IIS was to switch the application pool to the DeafultAppPool. Voila I can now run PHP and even phpinfo() works so life is good.

Motherboard Rejects Identical Hard Drives

Recently I have been working with Dell’s XS23-SB server, it is similar to a Poweredge C6100 in that it has four blades in a 2U Chassis. It has 12 3.5 inch hot swap drive bays in the front and the four blades are accessible from the rear with VGA, USB and networking ports.

The XS23-SB is part of Dell’s DataCenter Solutions (DCS) department so they are put together with commodity hardware. The motherboard is a Super Micro X7DWT which supports dual 5400′s, I went with dual  Intel Xeon L5420 CPUs. It has eight FB-DIMM ram slots and can support up to 64GB per node. There are four Sata ports on the motherboard that connect to the drive bays in the front via the backplane.

Dell XS23-SB Disassembled

Below you can see the XS23-SB disassembled. The four nodes are in a 2×2 orientation in the chassis. The top two are on a shelf which you remove with little difficulty after unhooking some of the cables. In the photo you can see two Xeon L5420 CPUs waiting to be installed.


XS23-SB Top shelf with two nodes

Below you can see the top shelf removed. This photo shows two identical motherboards side by side sharing the same power supply. They each take two CPUs and have their own VGA / USB outputs in the back of the chassis.

While setting this server up I ran into a unique problem. Using identical hard drives some of the nodes recognized some of the drives, and some of the drives simply wouldn’t work. I tried troubleshooting every combination of internals and inspecting the backplane, checking connections etc. I troubleshot the drives one at a time in ever node, no luck. I assumed at first that I had blown the drives due to static shock even though I usually wear a static strap.

I am working with two servers and I wanted to get all eight nodes up and running so I cannibalized a GDrive RAID-0 enclosure in order to use the two drives as OS drives, since at the time I was assuming that I had a handful of dead hard drives. I installed the first hard drive into a node and it worked fine. The second one however did not work.

This was a fairly frustrating experience and I had to regroup my thoughts. After some deep reflection and reviewing the process I had taken I theorized that since I was using drives that had been in raid configurations there must have been raid data on some of the drives that the X7DWT SATA controllers did not like.

The Solution

After doing a low level wipe the newly zeroed drives that did not work before, worked like a charm. It was as simple as wiping old RAID data from them!


IP Zebra The Classiest Way to Find Your IP Address

zebraBefore Very Official launched I created a very simple website called IP Zebra. This site is an alternative to other comical websites like IP Chicken that display a users’s IP address. While doing some maintenance on it today I decided to post on the blog to inform my readers.

Interestingly during my domain name research for IP Zebra it appears that there are enough IP address websites for an animal for every letter in the alphabet. So besides IP Zebra and IP Chicken there is also IP Spider, IP Monkey and a whole range of other websites in this genre.

IP Zebra IP Address Information

In my humble opinion none of them match the classy and comical design of ;)

Zip a Directory Using 7-Zip and the Windows Command Line

If you are like me you enjoy the peace of mind knowing that your data is fully backed up and properly versioned. Sure we all do database backups, it’s built into the database server as a feature. What about your IIS Wwwroot? Maybe the IIS log files directory?

This little command will zip a directory using 7-Zip and name the zip files with the date. I have found it useful for making weekly or daily snapshots of my Inetpub / Wwwroot folder. After setting up the batch file just make an entry in the Windows Task Scheduler to trigger it using your preferred schedule.

“C:\Program Files\7-Zip\7z” a -tzip X:\BackupFolder\Inetpub_%date:~-10,2%%date:~-7,2%%date:~-4, C:\inetpub\wwwroot\*.*

I chose to run from a batch file in order to accommodate future commands such as pruning backup copies or other future changes. Enjoy!

WordPress 3.5 Theme Directory Installation Error

Recently I setup for my wonderful girlfriend Nasim. I started with a stock WordPress 3.5 installation, setup the db, ran their famous “five minute” installation wizard. After logging in to the admin panel I received a big red error:

Error: the themes directory is either empty or doesn’t exist. Please check your installation.

After a little bit of troubleshooting I decided there might be an issue with the stock theme Twenty Eleven. I selected a stock theme from the WordPress website and activated it, no problem.

So currently there is an error in the packaged version of Twenty Eleven that ships with WordPress 3.5, just add a new theme, activate it and you should be all set.



Dell PERC/6 Raid Migration Levels

Just posting this as an easy to find reference. Whenever I want to check the raid migration levels for PERCs I always have to wade through lots of documentation. The table below lists the raid migration levels for Dell Poweredge Enterprise Raid Controller V6  (PERC/6). This table was copied from the Dell document About PERC 6 and CERC 6/i Controllers.


Table 3-2. RAID Level Migration


Source RAID Level


Target RAID Level


Required Number of Physical Disks (Beginning)


Number of Physical Disks (End)


Capacity Expansion Possible



RAID 0 RAID 1 1 2 No Converting non-redundant virtual disk into a mirrored virtual disk by adding one drive.
RAID 0 RAID 5 1 or more 3 or more Yes At least one drive needs to be added for distributed parity data.
RAID 0 RAID 6 1 or more 4 or more Yes At least two drives need to be added for dual distributed parity data.
RAID 1 RAID 0 2 1 or more Yes Removes redundancy while increasing capacity.
RAID 1 RAID 5 2 3 or more Yes Maintains redundancy while doubling capacity.
RAID 1 RAID 6 2 4 or more Yes Two drives are required to be added for distributed parity data.
RAID 5 RAID 0 3 or more 2 or more Yes Converting to a non-redundant virtual disk and reclaiming disk space used for distributed parity data.
RAID 5 RAID 6 3 or more 4 or more Yes At least one drive needs to be added for dual distributed parity data.
RAID 6 RAID 0 4 or more 2 or more Yes Converting to a non-redundant virtual disk and reclaiming disk space used for distributed parity data.
RAID 6 RAID 5 4 or more 3 or more Yes Removing one set of parity data and reclaiming disk space used for it.
NOTE: The total number of physical disks in a disk group cannot exceed 32.
NOTE: You cannot perform RAID level migration and expansion on RAID
levels 10, 50, and 60.