Setting up an avatar for your WordPress blog

I’m pretty new to WordPress; the older versions of this site used a custom application I wrote using .NET which I just didn’t have time to maintain anymore. I started porting over all my posts and comments and noticed it always shows my profile as the default “unknown” icon.

First step to fix this is to sign up here at Gravatar. You create a profile using your email as your unique identifier and upload the picture to use. After you do that, you can verify access which allows the blog to display this picture of you. You go to Edit My Profile > Verify Services, then pick “WordPress” and click add. Put your blog URL and the credentials to login and that will do it.

Just one last note: you’ll need to have XML RPC support enabled for this to work (you may have gotten an error in step above if it’s not enabled). You can enable support in WordPress under Settings > Writing > Remote Publishing. Here’s a link to a great article by Go Daddy that explains what enabling XML RPC support does.

Editing your PHP settings with Go Daddy Web Hosting

I have a Windows Web Hosting account through Go Daddy and I recently installed the Coppermine image gallery program using Go Daddy Hosting Connection. When I started to upload pictures, the Coppermine program was running out of memory while doing batch adds. This meant it wouldn’t create thumbnails and ultimately wouldn’t add my pictures.

Since Coppermine uses PHP, we need to increase the memory usage allowed. To do this, we need to edit the php.ini file. This file contains all the settings that Go Daddy web servers will consider when running PHP for your account. Please note, the below procedure is for Windows with PHP 5; if you have another installation, please see this article.

First, let’s output the php.ini file. Here’s a sample script you can create and put your root directory. Name the file test.php and upload it to your FTP root.
<? system("type c:\\cgi\\php5\\php.ini"); ?>

Execute that script by loading it up in your web browser. It should now output the full php.ini that Go Daddy uses by default. Save that to disk and open it up in your favorite text editor.

In that file, search for “Resource Limits” and you’ll find a section like this:
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing ...
max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 32M ; Maximum amount of memory a script may consume (128MB)

I just had to bump up my memory_limit from 32M to 64M. After you make that change, save the file as “php5.ini” and upload it to your FTP root.

That did the trick and I was able to upload pictures no problem. If you do all of the above and it doesn’t work, try logging into your HCC and recycling your application pool.

Upgrading your Go Daddy account to .NET 4.0

Right now this website is written in .NET and I’ve only recently decided to try to upgrade it. About 6 months ago, I did an upgrade which brought me from IIS 6 to IIS 7. I had to migrate my database to SQL Server 2005 to accommodate the upgrade but it worked. Behind the scenes, Go Daddy migrates your account to another box which is running Windows Server 2008 and IIS 7.

Now that I’m on IIS 7, I’d like to upgrade my .NET support to .NET 4.0. I recently bought a great book called C# 4.0 in a Nutshell: The Definitive Reference and after skimming through it, I’d like to start using some of the new .NET 4 features.

Go Daddy has full support for .NET framework 4, but only if it’s a Grid account. The Grid technology basically scales your website by copying the virtual directory content to other boxes and providing load balancing. It’s free to upgrade to a grid account, so here’s how you do it!

Sign into your Go Daddy account. In the “My Account” screen, pull up “Web Hosting” under your products. It should look like this:

In the above picture, you’ll notice I highlighted my account with a red box. Click that hyperlink (the part that has the box around it). It’ll bring up some billing options.

Once you click, it’ll pull up billing options that look like the above picture. Once that comes up, go to the “Edit Account Details” tab. Under the plan drop down, you’ll be able to change your account to a Grid account. Non-grid accounts are called classic.

Once that change is made, it’ll take some time for it to go through. When I changed to grid, it took about 2 hours to be processed. Behind the scenes, it’s copying your information over to a server built for the Grid technology.

Once you’re migrated, you’ll want to launch the Hosting Control Center (this is the product I work on). In the “My Account” screen, you can click the “Launch” button to bring up the control center:

Once this is up, you can click “Settings” and it’ll show the icons just like the picture above. To enable .NET 4, you’re going to want to click the icon “Add-On Languages”.

That will bring you to this screen. Here, simply pick “ASP 4.0″ and click “Continue”.

Problems I ran into (and what I did to fix them)
My upgrade didn’t happen without issue. The problems that came up were really easy to work through, though.

The first thing you’re going to want to check are your directory permissions. I noticed when I got migrated that it reset all of my writable directories (for example, logs).

After that, I had to work through 2 issues with IIS. First issue was that I was getting a 500 error. My web.config was still using the old IIS 6 way of displaying errors, so I had to update it to use the new IIS 7 way out outputting errors. Here’s what that looks like:

<configuration>
 <system.webServer>
  <httpErrors errorMode="Detailed" />
  <asp scriptErrorSentToBrowser="true" />
 </system.webServer>
 <system.web>
  <customErrors mode="Off" />
  <compilation debug="true" />
 </system.web>
</configuration>

After that was done, I could see there was a problem with one of my custom http modules (I’m running my application in integrated pipeline mode). I wrote a simple module to work like Apache’s mod_redirect. It’s used to canonicalize my URLs to one final URL ( for example, brianclifton.com instead of brianclifton.com/ ). It also redirects old content.

I had to remove the module from the <system.web> section. I already had the new entry in <system.webServer> (I guess .NET 2/3/3.5 let both entries co-exist). Here’s what my new entry looks like:

<system.webServer>
 <modules runAllManagedModulesForAllRequests="true">
  <add name="UrlRedirector" preCondition="" type="BrianClifton.UrlRedirector"/>
 </modules>
<system.webServer>

After that change, the site loaded up great!

I only ran into one more problem, which happened when I was trying to write this article. Because I have to enter HTML into the blog entry, ASP.NET freaked out because it could have unsafe content in the text. Even though I had a page directive specifying ValidateRequest=”false”, I had to make another web.config entry under the <system.web> section…

<httpRuntime requestValidationMode="2.0" />

That did the trick and it’s been running great since!

Go Daddy TechFest 2009

Starting in 2008, every year Go Daddy holds the TechFest event at the F1 Race Factory here in Phoenix. The event is for all the folks in the hosting department and features employee lead courses, food, and go cart racing.

When I was there, I met up with the Go Daddy girl Candice Michelle:

Candice Michelle

Candice Michelle

Bob Parson’s 16 Rules For Success

Professionally, I work as a Software Engineer at Go Daddy. The crazy Super Bowl ads and fun company culture are what attracted me to work there. The owner of Go Daddy, Bob Parsons, has a list of “16 rules for success in business or life in general” which I thought were worth sharing.

1) Get and stay out of your comfort zone.
2) Never give up.
3) When you are ready to quit, you’re closer than you think.
4) Accept the worst possible outcome.
5) Focus on what you want to have happen.
6) Take things a day at a time.
7) Always be moving forward.
8) Be quick to decide.
9) Measure everything of significance.
10) Anything that is not managed will deteriorate.
11) Pay attention to your competitors, but pay more attention to what you’re doing.
12) Never let anybody push you around.
13) Never expect life to be fair.
14) Solve your own problems.
15) Don’t take yourself too seriously.
16) There’s always a reason to smile.

Bob’s motto is “We’re not here for a long time, we’re here for a good time”. He has a video blog which has a lot of great material worth checking out. He also reads every comment and responds to a lot of them.
http://www.bobparsons.tv/