Hey folks,

Sorry for the lack of updates in recent times, I’ve moved from the USA back to the UK because my visa (and money) ran out. I’ve retired the old webserver vader for the time being, and had to switch over to luke. There’s been more than a few issues stemming from moving my sites between the two. Hopefully, I’ve stamped out most of the problems and things should run a touch more swimmingly – thus meaning I should have time to post again.

Hooray!

Current Mood:Happy emoticon Happy

Offload this yammering idiot:
  • Digg
  • del.icio.us
  • Facebook
  • RSS
  • StumbleUpon
  • Reddit
  • Tumblr
  • Add to favorites
  • Slashdot

The Problem

Downloading update from http://wordpress.org/wordpress-3.0.1.zip

Unpacking the update…

Could not create directory.: /directory/to/website/wp-content/upgrade/wordpress-3.tmp

Installation Failed

I installed WordPress through a web host administrator panel/program (such as Fantistico)

If you have installed WordPress through an admin interface from your web host- then the updates will likely need to be done through their interface, you might not have the power to go around changing permissions. Thus, this article is not for you! Good luck!

But I’ve upgraded WordPress loads of times, using the automatic uploader?

Yes, so did I before I stumbled across this problem. It seems that with the advent of WordPress 3.0, changes needed are more than just bugs fixes and minor content addition. Thus the requirements of your permissions needing to be absolutely correct becomes an issue, one that determines whether you will be able to upgrade through the WordPress administrator interface or not.

Get on with it then! How do we fix it?

For most people the exact cause of the error is slightly different, but boils down to the user account used to update WordPress not having the correct privileges. Go to the root folder of WordPress, and give the uploading user permissions to read, write and execute. So you would type in something along the lines of : sudo chown -R username /path/to/wordpress/ . Obviously this assumes the current owner has the correct read, write and execute privileges.

However, if you’ve made the Apache or your webserver daemon/user as owner of WordPress. I would recommend change the owner to a different account, and give Apache access to read & execute through GROUP permissions. If you don’t want to change the owner of the folder, then what might be advisable to do is make your upload user a member of a new permission group, and allow the user account (used for WordPress uploading/updating) priviliges to read, write and execute.

Once you have changed the permissions, try again & hopefully WordPress will update!

It works! But then I get different errors…

Double check all of the permissions. Navigate to the problem directory, and ensure the directory has rwx permissions for your uploading user. If not, fix it and try again.

For me, I still had problems. Even though the files and directories were all correctly set, it still had problems writing files to my WordPress directory. If you’re absolutely sure that your file permissions are all working, proceed with the following.

Uploading Method

Turns out it was still an issue of permissions, but it stemmed from a different location. What method are you using to upload the data to your server? Check the configuration files for the daemon, and see if you have correctly set the upload permissions.

For example, I was using vsftpd (Very Secure File Transfer Protocol Daemon) at the time of upgrading my WordPress and in the configuration file I had set the file permissions mask incorrectly! I navigated to my vsftpd.conf file, and checked its local_umask value. I had messed up the upload (file permission) mask – I had set it to the permissions I wanted the file to have, not the correct corresponding mask values. No idea how that issue didn’t flag up before the WordPress debacle.

If you use vsftpd as well, edit /etc/vsftpd.conf (with root user privileges!) and find the section of the file that looks like this:

# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd’s)
local_umask=077
That would force the user’s FTP permissions to be 700 (rwx for the owner only), which in my situation works, but you’ll want to change the mask for how your server operates.
Hope this saves you some of your (remaining) sanity!

Current Mood:Abashed emoticon Abashed

Offload this yammering idiot:
  • Digg
  • del.icio.us
  • Facebook
  • RSS
  • StumbleUpon
  • Reddit
  • Tumblr
  • Add to favorites
  • Slashdot

Make sure you vote for a representative that has your rights at heart – The Digital Economy Bill was rushed through, and to be honest, its a nasty piece of legislative hell.

Theg has put up a good site for monitoring MPs’ responses to Digital Economy Bill. Its in its infancy, but you can help to make it better! Get a real feel of which party supports the removal of Digital Rights.

Offload this yammering idiot:
  • Digg
  • del.icio.us
  • Facebook
  • RSS
  • StumbleUpon
  • Reddit
  • Tumblr
  • Add to favorites
  • Slashdot

I’ve been looking at some tutorials across the net for nifty things you can do with Django to add to my project. However, looking at them, I keep getting struck time and time again by some basic and very key misunderstandings about how to use the Django framework. I’ll offer a few pointers:

YOU’RE DOING IT WRONG WHEN:

  • You use PHP
  • You use Javascript1
  • You determine which template to use, WITHIN the template scope
  • You use PHP
  • Your database is directly accessed from within the template scope2
  • You have a bazillion different templates3
  • Hardcode all the variables in4
  • You don’t know how to use Python, so decide to package another language inside5
  • You use PHP

I have no doubts that this list will grow.

  1. unless its AJAX
  2. unless its AJAX. See 1.
  3. “D-R-Y. Don’t repeat yourself. Read up on generic views please!
  4. I’m sorry, but if you post a tutorial online, it should be as decoupled as possible. We’re not going to have your entire series of your handy apps to do the heavy lifting for us
  5. This isn’t *always* bad, if you need something done efficiently – but don’t use it because you don’t really know Python. Why the hell would you use Django then if you don’t know Python? Dribbling fool.

Current Mood:Angry emoticon Angry

Offload this yammering idiot:
  • Digg
  • del.icio.us
  • Facebook
  • RSS
  • StumbleUpon
  • Reddit
  • Tumblr
  • Add to favorites
  • Slashdot

With Quetzi needing some minor adjustments, I’d like to move the discussion to here:

With the British General Election coming up, I thought I’d start throwing ideas out here for discussion. I am interested in hearing everyone’s side and point of view on the matters at hand.

One big problem with the British Welfare System is those who abuse the system, sitting down in their free house getting paid to sit on their backsides doing nothing. I’m not saying all those on welfare are wasters, quite the opposite in fact. Especially in this economic climate, many of these people until recently had long term jobs and have been made redundant.

I *am* however, referring to those who abuse the system.

So, I finally get to the idea. Those who have been on the ‘dole’ for a significant portion of time should engage in “volunteer” work. For example, helping clean up the streets, planting and rejuvenating wasteland, helping mentor a child, working with the elderly, the list can go on. I mean, we’re already paying them right?

And if they refuse to work these “volunteer” roles, their payments should be gradually scaled back until funding stops.

This debate isn’t just on whether this idea is a good or bad one, but is also how to implement (or not) such a system – or just suggest an alternative. Lets get constructive & creative people!

Current Mood:Alarmed emoticon Alarmed

Offload this yammering idiot:
  • Digg
  • del.icio.us
  • Facebook
  • RSS
  • StumbleUpon
  • Reddit
  • Tumblr
  • Add to favorites
  • Slashdot

With the British General Election coming up, I have a few thoughts on articles coming up – on each article I’ll link you to some discussions I’ll start on Quetzi. You’ll not likely have heard of Quetzi, its a site dedicated to open and honest debate, without trolling and flaming. Its relatively young and still in development.

Look forward to seeing you on there, especially if you’re arguing against me!

EDIT: Due to the way Quetzi is constructed –  I actually cannot give you a link to the thread :/. However, if you want in, create an account, leave a comment I’ll send you an invite.

Current Mood:Happy emoticon Happy

Offload this yammering idiot:
  • Digg
  • del.icio.us
  • Facebook
  • RSS
  • StumbleUpon
  • Reddit
  • Tumblr
  • Add to favorites
  • Slashdot

… is perhaps the best thought out character ever made. Seriously, check the date, its well into April.

Man, if I were a vampire in Stephanie Meyer’s world, I would probably be more emo than Edward. Seriously? All the brilliant powers of being a vampire (eternal life, hotness, the ability to survive off sucking the blood of animals) – and then I turn twinkly when I walk in the daylight.

I would be so unbelievably annoyed. I think I would have a personal crusade to spread the misery as far and wide as possible. Mind you, that *is* an interesting basis for my short story…

</rant>

Current Mood:Mischievous emoticon Mischievous

Offload this yammering idiot:
  • Digg
  • del.icio.us
  • Facebook
  • RSS
  • StumbleUpon
  • Reddit
  • Tumblr
  • Add to favorites
  • Slashdot

Something that has been asked around the internet alot, but as far as I can tell nobody has given a definitive answer on the matter. Its not particularly difficult to fix, just annoying to deal with if you’re new to Django.

Cause

If you use the development server that ships with Django, you’ll never come across this problem. I highly recommend using the development server – it automagically handles alot for you, especially pertaining to the admin interface. However, there comes a time when you want to start deploying your lovely new Django website to the world.

In my case, my problems arose when I put my project onto an Apache2 webserver (since this isn’t a tutorial to setting up django/apache/mod_wsgi environment – use this). Although my project was fine, when it came to the nice admin interface – I noticed it was missing javascripts and cascading style sheet documents. Nightmare.

Initial Workaround

My initial workaround was to use Apache as a reverse proxy, and then point admin directory to the development server. Very typical of me, and hacky. Obviously, this is not ideal – having resources being consumed by a ‘unnecessary’ second web server. Works though.

I would not recommend this method, especially considering how easy it is to fix.

Solution

So with my project coming closer to requiring real users/testers, I needed to fix the admin interface for me and my mate. My server can get quite taxed at times, and I really needed to drop my development server. Most importantly, I wanted to avoid my fellow admin laughing at me when he had found out what I had done!

For this to work, make sure that you have Apache redirecting your static folder to ./media. This will *hopefully* natively match to your admin interface’s missing files. I rather quite like this instructional for getting my vhost set up correctly for static serving.

These are the steps you need to follow:

  • Get a copy of the Django source code.
  • Navigate to django/contrib/admin/media/ within the source code (I like getting the data straight from the trunk).
  • Copy the media folder contents to your statically served Apache media  folder with the same hierarchy as they’re copied across (three folders: js, css & img ).
  • Celebrate.

I could drag out the solution further, but I’m assuming you have a working knowledge of Django and Apache. Obviously, if you don’t use Apache, find the relevant instructions for handling static files for your webserving software.

Current Mood:Happy emoticon Happy

Offload this yammering idiot:
  • Digg
  • del.icio.us
  • Facebook
  • RSS
  • StumbleUpon
  • Reddit
  • Tumblr
  • Add to favorites
  • Slashdot

Today I set up the development blog for hungrybugger again – http://developer.hungrybugger.co.uk.

Its been added to the blog links and rather than connecting the hungrybugger project link to a development server, I’ve attached it to the dev blog.

Also, I’ve had more of a look at Effing Pot – and because it does the job so well I’m not going to compete, I’m just going to contribute to that site there. Seriously, check it out!

A minor blog update – but I thought I’d bring your attention to it. On the first of every month – I’ll be updating what I’ve done in the States of that month. Tomorrow that’ll be April 1st or “April Fools Day” – I’m not going to fool you on that post.

Promise.

Current Mood:Mischievous emoticon Mischievous

Offload this yammering idiot:
  • Digg
  • del.icio.us
  • Facebook
  • RSS
  • StumbleUpon
  • Reddit
  • Tumblr
  • Add to favorites
  • Slashdot

You may have noticed the removal of such page – simply because it was glitching and not updating properly. Not to mention my weight started rising again (due to muscle gain).

I have now filled my two memory cards with pictures and realised its probably time to release them to you lot :)

Current Mood:Sickly emoticon Sickly

Offload this yammering idiot:
  • Digg
  • del.icio.us
  • Facebook
  • RSS
  • StumbleUpon
  • Reddit
  • Tumblr
  • Add to favorites
  • Slashdot
© 2010 Brit on the Run Suffusion WordPress theme by Sayontan Sinha