Windows 7 Partition Manager

I’ve just found a handy free tool for managing partitions really easily in Windows 7.

http://www.partitionwizard.com/free-partition-manager.html

I’d used the built in partition manager in the Windows 7 Disk Management tools to shrink my primary volume and make the second drive, but then I realised I’d made it too big and needed a couple of extra gig added back onto my C drive. The only way I could see to do that using Windows would have been to copy all the files from D to C, delete D, expand C and create a new D in the remaining space! :(

Partition Wizard 5 let me just shrink D, move D along into the blank space and then expand C. The interface is very much like that of good ol’ Powerquest’s Partition Magic which makes it very easy to get comfortable with.

The home edition of the software is completely free, it works with Windows 7 64-bit, and it took about 2 and a half mintues finish the job! :)

(By the way, I’m not at all affiliated with this software or it’s author, I just found it on Google and thought it was really good! ;))

0  
6  

“You do not have sufficient permissions to access this page” after WordPress upgrade

If you’ve done a wordpress upgrade which included either copying another wp database or changing the current one’s table prefix (as well as changing the $table_prefix PHP variable in your config file,) you will most likely be met with this warning when you try to log in:

You do not have sufficient permissions to access this page.

The reason for this is that everything in wordpress that accesses info in the db does so from PHP using the $table_prefix variable, and when you first installed your blog, a couple of options are set in the database that include that value, which makes it not really so dynamic! ;)

After rooting through my db, I found 5 or 6 values that still had the old table prefix in – mostly in the `usermeta` table, but also one in the `options` table. To make sure I got them all, I ran these simple SQL statements in phpMyAdmin to update all the values:

UPDATE `wp2_usermeta` SET `meta_key` = REPLACE(`meta_key`, 'wp_', 'wp2_');
UPDATE `wp2_options` SET `option_name` = REPLACE(`option_name`, 'wp_', 'wp2_');

(note: please be sure to backup your database before you execute any SQL on it – if something goes wrong, there’s not a lot you can do to recover it without a backup!)

In those two examples, assume the original prefix was “wp” and the new one is “wp2″.

With that done, I can now log in to my newly upgraded blog again! :)

17  

WordPress 2.8 automatic upgrade fails

I’ve been trying to update my wordpress blogs from various versions like 2.5 and 2.7 to the newest 2.8 for a while now, but was never able to do it automatically.

Every time I pressed the “upgrade automatically” button, it told me it was downloading the latest file from WordPress, but it never got any further than that. I logged in to my site using my FTP client and found a 0KB sized file called wordpress2.8.zip in the wp_content folder, so I thought I’d found the issue – maybe the script can’t actually download the file and save it to disk because of permissions. I chmodded the file and then the folder to allow write access, but no joy.

Of course, I could have just downloaded the latest install from wordpress and done a manual upgrade, but there’s about 8 million files in the zip file and I didn’t want to have to upload that to 5 different sites! ;)

After a bit of research, it turns out that the problem is that the auto-upgrade script requires PHP5 to run, and as my sites are hosted on 1and1 servers which default to php4, the script was failing!

So if you’re having the same issue, all you need to do is make sure your wordpress is running on PHP5 instead of 4! If you’re on a shared server and you can’t change the server’s config, you can still tell apache to run your scripts as PHP5 rather than 4 by adding the following line to your .htaccess:

AddType x-mapp-php5 .php

All that does is tells apache to to parse all .php files with the PHP5 parser rather than whatever the server’s default is! So just throw that in the .htaccess you find in the root of your site – put it just after the “# END WordPress” line – save it, upload it and try doing the upgrade again – it worked first time for me! :)

If you’re still having trouble after that, or you’ve got a different solution, please post a comment here and let others know!

5  

The JavaScript Programming Language

Someone posted these links in a resources thread in one of the programming forums I contribute to.

It’s basically a presentation by Yahoo! JavaScript Architect Douglas Crockford – it’s a couple of years old, but it’s all still pretty much accurate.

It’s a must-see for anyone who doesn’t know much about JavaScript, or more importantly, anyone who thinks they know about it and has cast it aside as a “simple scripting language”. ;)

It’s about 2 hours long so it’s a bit of an investment, but it’s been broken up into 4 half-hour-ish videos for your viewing pleasure.

Enjoy:

Part 1, Part 2, Part 3 and Part 4

2