Multiple background images with CSS in IE8

There are still a decent percent of browsers out there on the increasingly-antiquated Internet Explorer version 8.
So while upgrading a site recently to an all-CSS based design, we wanted to continue to support IE8 and needed multiple background images on a single element using CSS.
This post was the most elegant explanation I found.

For future reference, here is the magic:

HTML


    <div class="container">
    	I need 3 backgrounds!
    </div>

We are going to apply multiple backgrounds in IE8 to this div.container by using the :after and :before psuedo classes in IE8.
CSS


    .container {
    	background-color: #eee; // A light gray
    	height:200px;
    }

    .container:before {
    	content: '';
		background-color: #3c3c3c; // A medium dark gray
		width: 100%;
		height: 30px;
		top: 0px;
		display: block;

		z-index: 1;
		position: relative;
    }

    .container:after {
    	content: '';
		background-color: #000; // Black
		width: 100%;
		height: 10px;
		top: 0px;
		display: block;
		z-index: 1;
		position: relative;
    }
Posted in Uncategorized | Leave a comment

nginx configuration for wordpress

There is a lot of information around the web about how to do this, but once I followed this page, things worked correctly with “pretty URLs” and my wordpress site’s theme.
For future reference, here is the magic:

# Upstream to abstract backend connection(s) for php
upstream php {
        server unix:/tmp/php-cgi.socket;
        server 127.0.0.1:9000;
}
 
server {
        ## Your website name goes here.
        server_name domain.tld;
        ## Your only path reference.
        root /var/www/wordpress;
        ## This should be in your http block and if it is, it's not needed here.
        index index.php;
 
        location = /favicon.ico {
                log_not_found off;
                access_log off;
        }
 
        location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
        }
 
        location / {
                # This is cool because no php is touched for static content. 
                # include the "?$args" part so non-default permalinks doesn't break when using query string
                try_files $uri $uri/ /index.php?$args;
        }
 
        location ~ \.php$ {
                #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
                include fastcgi.conf;
                fastcgi_intercept_errors on;
                fastcgi_pass php;
        }
 
        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                expires max;
                log_not_found off;
        }
}

With this configuration we should be able to serve wordpress very easily. Once you setup your backend (php-cgi or php-fpm) should work perfectly.

http://wiki.nginx.org/WordPress

Posted in Uncategorized | Leave a comment

Working with resolvconf on Ubuntu

Trying to update your nameservers the old fashioned way can be a headache on Ubuntu. There is this thing called resolvconf that likes to change your settings back when you reboot. So for future reference, here’s what I found.

First of all, as with any normal linux install, nameservers are spelled out in the file “/etc/resolv.conf” however this now includes the ominous warning
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN

There is a folder /etc/resolvconf/resolv.conf.d/ with 3 files; “base”, “head” & “original”. The warning above actually comes from this head file. In the base file you should add the nameservers on lines like:


nameserver 192.168.1.1
nameserver 192.168.1.2

Then if you run ‘resolvconf -u‘ your nameservers will update to include those from the base file. However you may get some additional nameservers showing up, if you have them designated in /etc/network/interfaces with the “dns-nameservers” option, eg

dns-nameservers 192.168.1.11 192.168.1.12

If you have the same nameservers set in both places (the base file and the interfaces file) they will only show up once in /etc/resolv.conf

Posted in Uncategorized | Leave a comment

kernel error task_setrlimit

kernel: You need to implement a remote task_setrlimit in your security module and call it directly from this function
WARNING: at security/security.c:51 security_ops_task_setrlimit()

According to this post,

the warning is harmless unless you’re defining your own security modules. It’s just an annoying worry that’s going to bite loads of people.

Posted in Uncategorized | Leave a comment

Enable Telnet in Windows 8

To enable Telnet in Windows 8, open a cmd prompt as administator
type “optionalfeatures” and hit enter
look for Telnet Client and check it.
Press OK and find something else to do for the next few minutes.
Presto.
Thanks to this website for this way, which was easier than some of the others posted around the web.

Posted in Uncategorized | Leave a comment

Installing PHP5 on Ubuntu Server

When installing PHP 5 from source I ran into the following problems and solutions:

Problem:
configure: error: xml2-config not found. Please check your libxml2 installation.
Solution:
sudo apt-get install libxml2-dev

Problem:
configure: error: Cannot find libz
Solution:
sudo apt-get install zlib1g-dev

Problem:
configure: error: Please reinstall the libcurl distribution
Solution:
sudo apt-get install libcurl4-gnutls-dev

Problem:
configure: error: DBA: Could not find necessary header file(s).
Solution:
sudo apt-get install libgdbm-dev

Problem:
configure: error: png.h not found.
Solution:
sudo apt-get install libpng-dev

Problem:
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
Solution:
sudo apt-get install libmysqlclient15-dev

During make:
/usr/bin/ld: /usr/local/ssl/lib/libcrypto.a(cversion.o): relocation R_X86_64_32 against `.rodata.str1.1′ can not be used when making a shared object; recompile with -fPIC
/usr/local/ssl/lib/libcrypto.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1

Solution: Go back and reinstall openssl with ./config enable-shared as per this answer and not sure if it mattered but i also did ‘apt-get install curl’ at this point.

Next Problem:
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1
Solution:
as per this page we try this:
sudo apt-get install libtool
sudo apt-get install libdbd-mysql

and we’re up and running with our chosen options!

Posted in Uncategorized | 8 Comments

Trouble installing CENTOS from USB

I’ve spent a couple hours trying to install Centos from USB on a system that has no CD/DVDROM.

This blog and the comments are informative, but I keep getting stuck where it asks to install from Hard Drive. I see only the one partition and when using Ctrl+Alt+F2 to try to get the shell to switch them, i see a blinking cursor but cannot type. i can hit Ctrl+Alt+F1 to go back to the blue install screen or Ctrl+Alt+F3 to see some log info telling me that the iso was not found. I can type on that screen, to no avail.
I tried both iso2usb and unetbootin but must be doing something wrong.
Think I’m going to see if Ubuntu from USB goes any easier instead. Update, yes that worked much easier.
So after installing Ubuntu server, the system boots to a black screen with a blinking cursor. I realized grub got installed onto the USB stick instead of the HD. Put the USB stick back in and booted from it, then did grub-install /dev/sda to install grub on the HD, then all is well, the system boots without the USB stick.

Posted in Uncategorized | Leave a comment

Setup did not find any hard disk drives while installing Windows XP on ESXi 5.1

While trying to install a fresh copy of Windows XP SP3 on VMWare ESXi 5.1, the Windows installation kept failing when it came to find the installation drive. It just did not find any hard disk drives, regardless of whether we chose LSI or Bus Logic as the SATA controller.

While searching it seems this was a common problem with older versions of ESXi. What’s odd is that neither my coworker nor myself remember ever needing an additional driver while installing this same version of XP on a virtual in ESXi 5 in the past. My only guess is that perhaps we previously installed XP only on ESXi 5.0 and never before on 5.1?

In any event, using the driver for LSI Logic worked, as per the instructions here: and using the WinXPSCSI.flp file linked from the article, uploaded to the VMWare datastore.

Posted in Uncategorized | Leave a comment

Limelight Networks CDN down today ?

A client using LLNW CDN service is complaining of outages today for over 6 hours now. Not sure what’s up, some content on their CDN is working for me. But other is not… hmmm

following was just forwarded from a friend, at 1:30pm PST
————————————————————————————
Important Update on Phoenix Datacenter:

Sat Nov 23 2013 13:55 MST (GMT-0700) Limelight Networks Operations and Engineering teams are bringing affected servers back online, and service levels are improving.

As an additional note, our customer support systems were affected by the server outage, which may have delayed individual customer responses. These customer support systems have now been fully restored, and we are responding to all inquiries.

We will continue to provide updates as we make further progress.
We apologize for any inconvenience and thank you for your patience.

Incident Description:
Limelight Networks is experiencing a critical event that may impact your services. Engineering has crews on site working as quickly as possible to restore service.

Status: OPEN

Impact: Multiple services impacted

Regional: All

Priority: P1

Time Reported: Sat Nov 23 2013 04:30 MST (GMT-0700)

Time Resolved: TBD

Update Details:

Sat Nov 23 2013 13:55 MST (GMT-0700) Limelight Networks Operations and Engineering teams are bringing affected servers back online, and service levels are improving.

Posted in Uncategorized | Leave a comment

vsftpd 500 oops chroot

After rebooting an FTP server running vsftpd with chroot enabled, users were unable to use FTP and upon connecting would see the subject error; 500 oops chroot

After investigating some possible solutions, I found that the problem in this case was selinux. Disabling that got it working as expected, users can FTP and they’re chrooted to home directory.

Posted in Uncategorized | Leave a comment