Programming

Fix – 1and1 hosting not updating or plugin problems

I just found out why my wordpress installation was not working as I expected.  My wordpress updates would hang/not complete and the plugin installations would hang/stop or come back with errors.  As it turns out, 1and1.com defaults to PHP version 4 to execute the php scripts.  So, I just had to add the following code to the .htaccess file in my root of my blog directory:

AddType x-mapp-php5 .php

After that, everything started working real smoothly.  So, make sure you update that PHP4 to PHP5 if you’re using 1and1.com.

–Ben

Reference:  1and1.com

Get Last Modified Date from Webpage You’re Visiting

I found a neat little trick that allows me to get a last modified date / last changed date from a webpage I’m viewing.

Simply copy the code below into your address bar and it will cause a window to pop-up with the last modified date.

javascript:alert("Last Modified " + document.lastModified)

Very neat trick.

–Ben

Source:  About.com

User Login with Roles in Ruby on Rails

I’m busy tapping away at my current Ruby on Rails project and have been overwhelmed by the number of options out there.  Luckily I’m a member of URUG and we have some great discussions (and even better programmers).

I came across a discussion on role requirements for users.  Tim Harper developed what seems to be a very clean implementation of user roles in RoleRequirement using Restful-authentication.  I’ve installed both plugins and I like what I see.

I’m not that far into it, because I work as an attorney during the day.  But in just the little I’ve been able to chip away at my project, I think you might like it too.

–Ben