View RSS Feed

Developer Drivel

Urls 'n' ting

Rate this Entry
Spent a bit of time last night, and this morning when I got home fixing up things back end. Yes, I was backend to fix something that wasn't broken by me 30 seconds previously

Was fixing something I setup in November. You see, when we lost everything but the Playstuff database I put a new type of backup script that takes the htdocs folder (where websites sit) as well as the database. All round coverage.

Next I took the vBulletin attatchments, avatars, signatures, profile images and group images out of the database - because a nice database of 7MB is easier to manage in times of crisis than a lumbering one thats 100mb. vBulletin said I had to put the Attatchments folder in a non accessible directory so I did as requested, but if it's outside of htdocs then it's not being backed up

When I changed the backup script to just zip the next folder up it would just fail - because the php server (apache) was using the logfiles. Grr... So after some major reshuffling I had it all working.

And like everything if you do it hacky it bites you in the ass later on. For example I noticed the logfiles in their new location weren't getting rotated and thus we had an 80MB plain text error log, and a 330mb plain text access log. Not good.

So I shuffled everything back and edited the backup script to what I should have done in the first place and everything is peachy - we even have webstats working again. This data has been gathered since about 11am this morning only:



Aha, but why is this post title called "urls" - well this goes back to the 80mb error log. It was completely full of complaints that there were infinite loops in the clean urls. A little bundle of instructions (.htaccess) by vBulletin was the culprit and it also played havoc with the custom error documents I was trying to sort out.

So now everything is working, but any URLs in the old format would make a pretty little 404 error. If you spot them give one of the moderators or level 1's a shout and they can go fix it. I think I'd rather have a tiny error log and a few 404's than a 500 internal server error everytime a 404 was supposed to appear.

You can see the range of errors here:

http://playstuff.net/error/code/401
http://playstuff.net/error/code/403
http://playstuff.net/error/code/404
http://playstuff.net/error/code/500

So yup, thats that.

Submit "Urls 'n' ting" to Digg Submit "Urls 'n' ting" to del.icio.us Submit "Urls 'n' ting" to StumbleUpon Submit "Urls 'n' ting" to Google

Tags: None Add / Edit Tags
Categories
Uncategorized

Comments

  1. satanpenguin's Avatar
    Good move taking those images out from the database. Not only for the space but also a performance gain for sure, it's always better to serve something directly off disk than having to fetch it from db.
  2. Jamesy's Avatar
    Exactamundo
  3. Boylee's Avatar
    I lol'd at this: http://playstuff.net/error/code/500

    ^____^
  4. Logan's Avatar
    Good stuff mate

Trackbacks

Total Trackbacks 0
Trackback URL: