Categories
Technology

WordPress IIS7 Plugin Auto Upgrade Failing

I've been having a major headache with my blog and all of the WordPress blogs I host: the plugin automatic update is failing. It took a fair amount of searching, but alas I have finally found the solution.

Add the following declaration to wp-config.php:

define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] .'\wp-content\plugins' );

I'm not certain, but this seems to be an issue with either the PHP runtime or the call to delete folder made by the WP auto upgrade method. Something (I haven't identified the root cause yet) is causing the PHP-CGI to hang after deleting the plugin folder to prepare for the upgrade. This causes the thread to maintain a lock on the folder which, in turn, causes the rest of the update process to fail. I had been solving this with a recycle of the IIS App Pool (will killed the thread, releasing the lock) but this is a more tenable workaround until someone fixes the auto updater. The problem is definitely path related and seems to be that either WP or PHP is losing track of the location of the plugin folder during the deletion process; explicitly defining the location (above) allows the process to keep track of and release the lock on the folder.

The road to the solution was paved over at Ingvald's Knowledge Base (http://kb.belmans.net); a slight tweak of the code was required to make it work.

Categories
Technology

Play iPhone & iTunes video (mp4, mkv, etc.) in Windows Media Center

I was recently having difficulty getting iPhone videos to play on Windows Media Center. The reason we want to do this is to achieve a completely unified home theater - i.e. we want to be able to watch movies on the device of our choosing (iPhone, TV, Computer, etc.)

Continued below...

I had previously installed the K-Lite Codec Pack on our Media Center PC and was able to play the videos with no problem. I tried installing the K-Lite pack on my office PC and was still unable to play the videos. After a bit of researching and using a bit of well-tuned intuition, I discovered that a 64-bit version of the codec pack exists (link below); once I installed it, problem solved.

Moral of the story: use the correct version of the codec, it will eliminate a tremendous amount of heartburn & headache!

Links:

K-Lite Codec Pack on CodecGuide.com

Categories
Technology

New Video of Microsoft Surface Featuring Settlers of Catan

Microsoft released a new video yesterday featuring an officially-licensed version of Settlers of Catan developed by Vectorform Game Studios for Microsoft Surface. If you're into Settlers of Catan, this is definitely worth checking out: http://www.pocket-lint.com/news/34707/settlers-of-catan-microsoft-surface.

 

Categories
Software Development Technology

ASP.NET Embedded Database Support

Now this is cool, Microsoft has added embedded database support to ASP.NET 4 allowing you to create web applications with ASP.NET & SQL Server CE 4. Scott Guthrie (@ScottGu) explores this in more detail:

http://weblogs.asp.net/scottgu/archive/2010/06/30/new-embedded-database-support-with-asp-net.aspx

My Thoughts? This is a fantastic feature for those of us who are inclined to write occasional small personal web apps; we are spared the development overhead of having to develop a full-fledged SQL DB. Now all of you still using MS Access on your web apps, get with the program! One concern I do want to see more information to assuage is concurrency - obviously this solution would be fit for apps that have more than a couple of users but ScottGu's post doesn't mention much about this. Feel free to share your thoughts in the comments!

Categories
Technology

Visual Studio 2010 Power Tools, Power Commands, and Extensions

Scott Hanselman (@shanselman) has a great blog post about some excellent ways to customize & extend the IDE:

http://www.hanselman.com/blog/TheBestVisualStudio2010ProductivityPowerToolsPowerCommandsAndExtensions.aspx

Categories
Music Religion Technology Theology

Technology, Music, and Religion

As the subtitle of this blog states, the topics of interest to me are technology, music, and religion. This video of the band Rend Collective Experiment from Bangor, Ireland managed to epitomize it with a single video:

Simply awesome. Keep up the great work gentlemen!

Categories
Technology

Solved: Installing Kubuntu 9.10 on Windows 7 Virtual PC

I discovered frustration today while trying to install Kubuntu 9.10 on a virtual machine for use while testing web applications. The installation would begin, the screen would flash the message "Initializing key maps...", a flash of green garbage would appear on the screen, and then the virtual would disappear. Wow. I tried all of the multiple settings on the installation options menu to no avail. I finally gave up and was searching for a smaller, minimal Linux distro to download and came across my browser tab with my search for "kubuntu won't install virtual pc," I decided to give it one more shot, reworded the search to "kubuntu won't install on windows 7 64-bit virtual pc." The 8th result caught my eye: "NemesisV: Installing Ubuntu 9.04 on Microsoft Virtual PC 2007 SP1." It worked! The blog entry is worth checking out, in short, remove "quiet splash --" from install options and replace it with "vga=791 noreplace-paravirt" - Mission accomplished.

(continued below)



The article:

Installing Ubuntu 9.04 on Microsoft Virtual PC 2007 SP1 - NemesisV - http://nemesisv.blogspot.com/2009/04/installing-ubuntu-904-on-microsoft.html

***UPDATE - 4/26/2010***

I was never actually able to bring the system up. It installed just fine but when I rebooted the virtual to bring up the installed system, all I got was a blank screen (regular mode) or a bunch of segmentation faults (recovery mode). I'm assuming I was getting the segmentation faults in regular mode, I just couldn't see them.

I finally gave up on Kubuntu & downloaded and installed Ubuntu 9.10. It installed (using the advice above), rebooted, and is currently running with no issues . . . I guess KDE just is ready the virtual spotlight . . .

***UPDATE - 4/26/2010 (Yes, again)***

Ran into the same problem later today with the Ubuntu install, after a third reboot I started getting segmentation faults again. WTH? I was really annoyed so I did even more research the final conclusion was insane: I had allocated 512MB of RAM to the VM; once I upped that to 1GB (1024MB) it started working. The only thing I had changed between the time in which it was working and when it stopped working was a reboot (of the host system). I had disabled hardware virtualization acceleration earlier in the day but that did work so I had re-en

abled it and rebooted it when it was working. I rebooted later in the day and the virtual stopped working after that; the only conclusion I can draw is that the virtualization acceleration hadn't actually restarted and restarted after the (2nd) reboot.

So my current theory is that Ubuntu will run on Windows 7 64-bit Virtual PC with less than 1GB of RAM when hardware virtualization acceleration is disabled. When hardware acceleration is enabled, 1GB+ is required. I haven't tried this with the Kubuntu distro yet, but I'm pretty certain that the results will be similar. Thoughts and comments are welcome!

 

Categories
Software Development Technology

.toUpperCase() vs. .toLowerCase()

I don't remember where I got the notion, but for quite some time I have been under the impression that JavaScript's string.toUpperCase() method was always faster than string.toLowerCase(). It occurred to me today that I was taking this on the word of some anonymous blogger somewhere so I decided to put my long held belief to the test and was quite surprised by the results.

***UPDATE - 4/28/2010***

Google released an update to Chrome today (...). One of issues fixed was 42158: Decreased JavaScript benchmark speed. So I reran the tests & have included it in the results table.

In summary across multiple browsers, string.toUpperCase() was never faster and the results varied drastically:

All results are in milliseconds (ms).

Rank Browser .toUpperCase() .toLowerCase()
1 Opera v10.51 (Build 3315) 2.835 1.337
2 Safari v4.0.5 (531.22.7) 4.024 1.832
3 Internet Explorer 8 v8.0.7600.16385 3.306 3.130
4 Firefox v3.6.3 5.961 2.848
5 Chrome v4.1.249.1045 (42898) 9.618 8.159
6 Chrome v4.1.249.1059 (44723) 28.364 24.644
7 Chrome v4.1.249.1064 10.16 7.897

The really surprising results are the first one and the last one: Opera blew all of the other browsers away, it's nearest competitor, Safari took 41% longer with .toUpperCase() and 37% longer with .toLowerCase()! The real surprise came from Chrome; Google touts Chrome as one of the fastest JavaScript engines available (with which I generally agree). However, they clearly have some work to do on their string functions. In fact, while I was testing, I noticed that a new version of Chrome was available (4.1.249.1059) and installed it; as you can tell from the results, the performance of both functions decreased by a factor of 3!

Another look at the results:

 

The test consisted of converting a string of 709,180 characters of generated Lorem Ipsum text toUpperCase()/toLowerCase() 1,000 times and averaging the results. The test is available below; feel free to comment with your results and any recommendations for improv

ing the tests

JavaScriptStringTests.zip (199.63 kb)

Categories
Software Development Technology

Configuring JavaScript & jQuery Intellisense & Debugging in Visual Studio 2008

Let me begin by saying this post is in no way a knock against Firebug; Firebug is a fantastic tool that I do use on occasion. It is, however, my preference to develop within a single, unified IDE; Visual Studio 2008 was a huge leap toward this objective (I'm installing Visual Studio 2010 as we speak - I hold great hope for it to be another giant step forward).

Step 1: install Visual Studio 2008 SP1 if it's not already installed.

Step 2: Make sure that script debugging is not disabled in Internet Explorer (yes, IE is necessary for our purposes).

  • Tools > Internet Options > Advanced > Browsing - Disable Script Debugging (Internet Explorer): Unchecked

 

Categories
Software Development Technology

Code Samples to accompany my presentation at the OKCDG

Here are the code samples from my presentation to the Oklahoma City Developer's Group on April 5, 2010 (the slide deck is below in a previous post). I broke the examples out into their own pages to make it easier to browse. Let me know in the comments if anything doesn't work or isn't working as you would expect.

SynchronizingAJAXandASPNET.zip (94.62 kb)