The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]

Things look quiet here. But I've been doing a lot of blogging at dan.langille.org because I prefer WordPress now. Not all my posts there are FreeBSD related. I am in the midst of migrating The FreeBSD Diary over to WordPress (and you can read about that here). Once the migration is completed, I'll move the FreeBSD posts into the new FreeBSD Diary website.

Massive website changes 16 April 2001
Need more help on this topic? Click here
This article has 1 comment
Show me similar articles
Yes, I'm still in Ottawa.  The snow is all gone.  And some days are quite warm.  It was 16C about a week ago.  And I've managed to pay good money to watch bad hockey (Ottawa lost the first two games to Toronto).  The upside is that I've now managed to see my first NHL playoff games ever (apart from those I've seen on TV).

But while I've been socializing with old friends, watching hockey games, and waiting in secret for my parent to arrive back from holiday, I've had a few problems with the website.  It is the combined timing of this abundance of free time, total lack of responsibilities, and website problems that has prompted me to finally move towards implementing php across all of the website.

The conversion was an interesting task involving modification of well over 500 files.  Luckily, I did not have to do this by hand.  The first task involved renaming files.  I used this script to do that:

#!/bin/sh
for filename in $(ls *.php); do
echo "renaming $filename"
mv $filename.new $filename
done

The rest of the modifications involved putting common headers into each file, changing frequently used code snippets to php code, and other various administration-type tasks.   I have learned more about perl and regular expressions in the past 4 days than at any other time in my life.

Just because each file is now a .php, this does not mean that the article text is now in the database.  In fact, none of the text is in any database.  The database just contains the article title, date, topic, etc.  But that work was done a year or more ago in order to allow the home page, the index, and the topics page to be generated automatically.  It is this same database which is used to generate the mailing list notifications.

Your old URLs should still work so you don't have to modify your bookmarks.  I'm using rewrite to accomplish that.

But the major reason for converting all files to .php is to allow user feedback on an article by article basis.  That will be added at a later date.  I know I've been saying that for ages, but this time it's different.  The biggest hurdle has been jumped.  There's no going back now.  I'm going to customize phorum to do this.

Another thing I did was install Apache, perl, php, and mysql on my NT workstation.   This was surprisingly easy and straight forward.  Granted, I have done those tasks before in a Unix environment so that experience no doubt simplified things somewhat.   I started working locally because the lag back to my development box was getting annoying at times.  You try editing a file over a 33.6 line when it [at times] takes 2s for an echo....

The changes are ready to go.  I've already changed the DNS so that the TTL is low.   This will allow the IP change, when it occurs, to propagate quickly.  Before that happens, I'll give you a temporary URL so that you can go and test out the site and see if you can break it before I finally throw the switch.  Right now, I'm just waiting for my host provider to fix a wee problem I created early this morning.  As part of the upgrade procedures on the new box, I did a rm -rf * to clear everything out of the root directory of the website.  Unfortunately that also removed /cgi-bin/.

Good move Dan....  That will teach me to do such things that early in the morning.


Share
Need more help on this topic? Click here
This article has 1 comment
Show me similar articles