12.21.06

ZoneEdit Downtime Sucks

Posted in linux, web dev at 8:54 pm by Clinton

I know - emotive title, but zoneedit.com downtime does suck. Yes, I was using their “free” service, but if it doesn’t work it doesn’t matter what the price is. Not working still equals not working.

So, I have been a long time user of ZoneEdit.com, and although the web based interface is clunky (I’m sure it’s someones pride and joy, but I’m sorry, it really is poor) and in the past the pages only looked right in IE (its better these days…) BUT their reliability was good and their extra features (mail handling etc) were really good. I’ve recommended them to people many times.

Yesterday, one of the sites I host on my server wasn’t working for people. Specifically, email didn’t work. Then everything stopped. Eh? Problem? nslookup couldn’t resolve the domain. After some searching, I confirmed my suspicions with http://www.dnsstuff.com/ which gave me a lovely (exterior) view that the two nameservers were not responding at all.

Zoneedit allocates two (random?) nameservers when you add a zone. (They have many and they are well distributed as they should ideally be.) Unfortunately (?) the two allocated to that domain happened to be 2 of the 4 that, according to their online network status report were experiencing “issues”… aka not responding. Yes, that happens some times. It’s not a multi-million dollar ecommerce concern. Ok. But… it had been over 24hrs and still not working. Below is a later message when 3 were still not working.

We are currently experiencing issues with NS2.ZONEEDIT.COM, NS3.ZONEEDIT.COM and NS6.ZONEEDIT.COM. We are aware of the situation and our engineers are working diligently to get this resolved.

If reliable DNS service is critical for your site, we recommend logging into your account, clicking on “Nameservers” and purchasing a “tertiary” nameserver. 3 nameservers are exponentially more reliable than 2 nameservers.

So… I waited the day out. Like I said, not a critical site. I’m patient…

Note the advice to purchase a “tertiary” nameserver for “exponentially more reliable” service… urgh, whats an exponential of zero? ZERO!

Today: still not working. Okay, I thought, I need some working nameservers.

I’ll login to zoneedit and remove the zone and re-add it. I’ll get new nameservers allocated to me (each of the domains I’ve added in the past have different nameservers allocated to them - just as long as ONE of them works I’m happy.) WRONG. Only the first 5 zones (domains) added are free and I’ve used that quota now. If you remove one completely, you’ve still “used” it, so there you go.

Please genie in the bottle… can I have more wishes? :~)

Anyway, I’m not that bitter except that it feels like a ploy to get people to purchase zone credits. I hope it’s not, because it would be much better to just straight up say “we want money now”. I’d consider that. But not some underhanded “oh, sorry. We are diligently working on this…. but buy a nameserver and it will be working again.” Hmm… I wonder if “paid” zones get hosted on the “down” nameservers. I suspect not, but maybe that’s not fair. What I would have liked is a new nameserver for that zone, even temporary. Oh well.

Google time… free DNS service.

I’m now trying http://www.everydns.net and it’s been fine so far. They even have a PHP API if you want to code into that. They do ask for a donation, and after I’ve tried it for a while, I’ll do that.

For some reason I prefer to give everydns.net a donation when zoneedit.com felt like they were trying to squeeze $$ out of me. Maybe I just like conspiracy theories…

11.27.06

Local hosts File & Mac OS X

Posted in web dev, mac/os x at 1:33 pm by Clinton

So you need a local host file entry in Mac OS X eh? It’s

/etc/hosts

However you’ll need to sudo to change this (say sudo nano /etc/hosts).

So you change the hosts file, and save it, but you see no change in behaviour … unless … you flush the name lookup cache of lookupd. How do we do that?

lookupd -flushcache

This might help others.. but it’s mainly to reminder me in future. :)

11.10.06

Apache 2.2.3 Update - no authz_user Mod eh?

Posted in linux, web dev at 8:46 pm by Clinton

I recently used apt-get upgrade on my Debian server, and that included a new version of apache2 (2.2.3) and suddenly the two uses of .htaccess+htpasswd files I have were broken! (Didn’t break anything but my personal stuff, so it wasn’t then end of the world, but I still wasn’t happy). The apache error.log gave me
... access to / failed, reason: require directives present and no Authoritative handler.
hmm… i thought. :)

Google’d with the error string (how did we solve problems before Google? can’t remember…) and found this post which really helped, but unlike their direct creation of a symlink (ln -s …) I used the a2enmod command to do the trick.
a2enmode authz_user

Then called /etc/init.d/apache2 force-reload (or alternatively apache2ctl restart). I always baby-sit a Debian update, and on the few occasions there’s a problem it’s never been too bad. I’m happy this one didn’t take too long thanks to someone else posting their experience in a forum - I like the ‘net.

09.26.06

Wrong proxy settings? Write your own .pac!

Posted in web dev, programming, mac/os x at 3:32 pm by Clinton

Moving between home and work, I sometimes have issues with the proxy settings of my web browsers.

Today, I was trying out Eclipse, and while looking at the “what-new” and other tutorial related into, I had problems. The proxy.pac file that work has was making requests for 127.0.0.1 (aka “localhost”) also go through the proxy. Now, 1) I think that’s the wrong setting - if I ask for localhost it should go straight back to me - not to the local proxy and (then be ignored). 2) yes, I could set up the manual proxy settings with the appropriate “ignore proxy for” … addresses, but… i’m a coder at heart, so what I could I do?

Write my own (local) .pac file, and tell my browser to use that of course! :)

// Clinton’s custom proxy files - works at home and at work.
// Change the work vars to suit your home/school/work needs
// If you have multiple proxy setups at home, double-up the proxy behaviour.
function FindProxyForURL(url, host)
{
    var work_ip = “136.186.0.0″;
    var work_ip_mask = “255.255.0.0″;
    var work_proxy = “PROXY 136.186.1.14:8000; DIRECT”;

    // If only hostname specified, local host so go direct
    if (isPlainHostName(host))
        return “DIRECT”;
 
    // local host is always direct 
    if(isInNet(dnsResolve(host), “127.0.0.1″,“255.255.255.255″))
        return “DIRECT”;

    // Am I at work? Check for my IP in the work ip range
    if (isInNet(myIpAddress(),work_ip,work_ip_mask))
    {
        // Connect directly to local work domains
        if (isInNet(dnsResolve(host), work_ip, work_ip_mask))
            return “DIRECT”;
 
        // Is this a protocol that needs to be sent to the proxy?
        var bits = url.split(‘:’,2); // set limit - only need 2
        var p = (bits.length==2) ? bits[0] : ‘’;
        if (p ==‘http’ || p == ‘https’ || p == ‘ftp’ || p == ‘gopher’)
            return work_proxy;
    }

    // if you get to here, you don’t get a proxy
    return “DIRECT”;
}

It’s a quick hack, it works (so far) for me, and ymmv, but if you find it useful as well, that would great. This technique could be (and has been) extended to support ‘ad’ filtering from known URLs as well. There is a shExpMatch(url, “http://ads.somedomain.com/*”) function - I was hoping for regex powers, but alas it just supports “shell expressions” and that ain’t half as fun. :)

Helpful links on PAC files:
* http://en.wikipedia.org/wiki/Proxy_auto-config
* http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html
* Firebug http://www.joehewitt.com/software/firebug/ - yes it will tell you about errors in the pac file as well - v.cool.

06.08.06

Blogs on Web Levels..

Posted in web dev, teach, learn at 10:07 pm by Clinton

I’m a happy subscriber to the SitePoint techtime newsletter, and the lastest one gave me a solid but enjoyable bit of reading this evening (after following the links in the newsletter).

Emil Stenström : Levels [0 to 6] of CSS Knowledge
(11th Jan 2006)
http://friendlybit.com/css/levels-of-css-knowledge/
0. “CSS? Isn’t that a multiplayer game?”
1. “Yeah, I use it to remove underlines on links sometimes”
2. “No, I don’t like divs; tables are much easier to work with”
3. “Yeah, I’ve heard it’s good, but I can’t use it because…”
4. “CSS? Oh! Yeah, I use divs for all my layouts”
5. “I use CSS for design, it’s better than tables because of…”
6. “What version of CSS? Yes, I do. Did you read my book about…”

(133 comments… good, bad and obvious… I find it funny that some people in comments and trackbacks don’t realise the 0 to 6 levels == 7 levels, but hey, coders know about 0 indexes so that’s okay… :~).

It written well enough (+grain salt) but this one really got me starting to think about teaching, learning and where our students may be at with web dev and CSS and how we reach them. (I’ve now got Blooms taxonomy levels and everything else zooming in my head after that one.)

anyway, that last post then then inspired …

Roger Johansson : Levels [0 to 6] of HTML Knowledge
(30th May 2006) http://www.456bereastreet.com/archive/200605/levels_of_html_knowledge/
The levels have headings like “HTML LEVEL 3″, but the typical quotes are nice…
0. “Age-tee-em-what?”
1. “HTML? It’s those tags you use to make text bold or italic.”
2. “The controls I drag and drop in my IDE work fine in Internet Explorer, so why should I have to even look at the HTML?”
3. “Yeah yeah, I’ve heard about those fancy new ul and h1 tags, but I’m doing just fine with my trusty old table, img, and br tags.”
4. “How can I create a data table with divs and spans instead of tables?”
5. “Hmm. I wonder which type of list is the most semantic way to mark up this part of my document.”
6. “I think the HTML 4.01 and XHTML 2 specs are too semantically limited, so I am working on a new markup language.”
(178 comments, although #comment94 is a kicker… :~)

I like the writing style, and the points are very good but again some of the points (and especially the quotes i just listed) may not be understood properly unless the reader is somewhere down the list of levels and they know when to engauge “sarcasm” or “smug” mode while reading. Mind you, third paragraph is …

This is all written in a tongue-in-cheek way and is just my personal opinion. Please don’t over-react if you don’t agree or think some of the descriptions are a bit harsh. Try laughing instead.

Good advice for lots of post. I am always amazed when people go balistix on peoples post, like its their duty to correct the injustice of the world… from their point of view. Anyway, i’ll just start ranting, so on to…

Joe Clark : Levels [0 to 7] of Accessibility Knowledge
(2nd June 2006) http://blog.fawny.org/2006/06/02/niveaux/
Headings are just “Accessibility Level 3″ etc, so here’s my take on his points…
(I’m just trying to capture the points, not make my own)…
0. User level, not developer. Use common (MS) products, and don’t really think about how disabled users might go
1. Developers (FrontPage) who know that alt value = tooltips. Knows blind people will ask to “feel you face” (’cause that’s what they always do on TV).
2. Developers who know enough to be even more dangerous …
3. CSS is so good you don’t have to worry about poor HTML layout. Owns GoLive4.
4. jab at someone (who doesn’t “do” what they “preach” aka hypocrite issue?)
5. jab at someone (who doesn’t evangelise enough?)
6. jab at someone (who networks with publishers/people, suffers from 4 and 5, and looks down on mortals?)
7. jab at .. self? (interested in obscure subtopics, grating personality quirks… X in village).

No comments (doesn’t want them?). Eloquent writter, but my interest fades with my comprehension, so I get/smirk at most of the early points, but don’t see the point in wasting electrons for the rest - and I’m pretty sure Joe would think the same about my take - doesn’t care if i get it because it wasn’t meant for me. Hey, maybe that’s the subtle accessiblity point… :) nope. I still don’t get it.

Roger (Levels of HTML) then also inspired

Dean Edwards : Levels [1 to 6] of JavaScript
(2nd June 2006) http://dean.edwards.name/weblog/2006/06/levels/
Written in JavaScript of course! I had to repeat this one…

  1. alert(“Hello World”);
  2. var WORLD = “World”;
    function hello(who) {
        alert(“Hello “ + who);
    };
    hello(WORLD);
  3. <button onclick=“hello(WORLD)”>Say Hello</button>
  4. <button id=“hello”>Say Hello</button>
    var button = document.all.hello;
    button.onclick = function() {
        hello(WORLD);
    };
  5. var button = document.getElementById(“hello”);
    button.addEventListener(“click”, function(event) {
        hello(WORLD);
    }, false);
  6. var Hello = new Binding({
        greet: function(who) {
            alert(“Hello “ + who);
        },
    
        onclick: function() {
            this.greet(Hello.WORLD)
        }
    }, {
        WORLD: “World”
    });
    document.bind(“#hello”, Hello);

On a related note, has anyone else tried FireBug with Firefox for js debugging? Giving it a burl now… hmm. http://www.joehewitt.com/software/firebug/

06.07.06

blogroll. Hmm, upgrades…

Posted in web dev, byteclub, programming at 12:30 am by Clinton

Look again… more changes, feedback welcome (positive/negative/observational)…

http://www.byteclub.net/blog/index_comments.php

I haven’t linked in and checked the external blog comment feeds - i’m working on it and get it happening i promise.
Still think the count of post/comments is too high? Let me know your opinions.
Would really like to be able to sort comments by “post” (thread)? Let me know (pretty easy to do now).
Runs like a dog? Probably cache issues (but i did have to restart apache tonight… dunno what the deal is).

All feeds (blogs or comments) are cached for 10 mins, but I think there may be other proxy+chache issues causing havoc… it would be great to see things quicker!

04.12.06

MySQL clients: what’s your poison?

Posted in web dev, byteclub at 2:01 am by Clinton

So what do you use for mysql? Love that command line? Can’t live without a GUI? Web front-end is your thing? I’m curious… here’s some i’ve looked at recently (this ain’t no definitive guide), and so I thought I’d post a quick wrap and ask for further comment from the enlightened byteclubbers…

Tool License Version Size
MySQL Client GNU GPL 5.0.19-0 ~17M
(with "essentials")
MySQL Query Browser GNU GPL 1.1.20 ~5M
MySQL Administrator GNU GPL 1.19 ~5MB
DBDesigner4 GNU GPL 4.0.5.6 ~5.6MB
DBManager for MySQl Freeware (Private use) 3.1.1 ~4MB
Squirrel-sql GNU LGPL 2.2rc1 ~8.9MB
phpMyAdmin GNU GPL 2.8.0.3 ~3.6MB

You’ll notice that there is a pattern of “free” in the above list. Go figure… and hey - tables work in wp!

Now, the good-ole mysql client (CLI) you should know. I read recently something like “knowing SQL with a GUI is like knowing HTML with FrontPage” :~). But we still, we all like a good tool, and you should know your way around this puppy…

The mysql query browser is a new one - I didn’t know about it and i’m trying it tonight. So far, nice. Apparently you can say MyQB? Whatever. You can just type in your queries (it keeps a memory like a web browser concept), or use the tool bars to create a select type query -also nice. You can easily compare result sets and edit records, add new etc. So far my favourite features has to be the “Inline Help” feature (syntax/functions/params) because looking through the mysql.org docs again (for something i’ve used before and “kinda” know the syntax but can’t quite rememebr) is not my idea of fun. There’s also a script editor concept. (Not just multiple queries executed sequentially, but controllable conditional execution - nice.) Turn on the “advanced tools bars” - more buttons. There is a table editor (i couldn’t seem to change the order of fields… doesn’t really matter but) with clear options and some handy drag-n-drop features.

The mysql administrator - it’s an administration tool not a SQL client. So, use it to check the health of your databases, the memory, status variables, replication, backup, restoration etc! Look, it’s a definite advantage over the command line if your not a power (ie remember everything) user. Plus - the graph of load/memory etc a asthetically pleasing :~). You can create projects and schedual backups of your databases… cool. Just a note: the MyQB and this admin tool know about each other (and the command line tool if its available) and you can switch to each respective tool using handy menu links (and the connection details are store so you don’t have to retype that - but not the passwords - its called security!).

DbDesigner4. This probably deserves its own post, because I think its pretty cool. That said, i really haven’t used it that much yet, and only to “reverse engineer” existing db tables to get pretty diagrams of the design. I still have much to learn, so if anyone has used this one and can tell the pro/con features, let me know. So far, i like it a lot.

DbManager Pro - I’ve been using this tool since the dark ages, and so it has a special place to me and I included here, especially when it was (at the time) one of the best windows based GUI table editors/creators i’d found - it really helped me when I didn’t know the syntax etc and could do things graphically instead. However, after some buggy version in the past and UI changes, i’m not so loyal now, but its still a solid tool (and free for non-commercial use, which also limits my preference now).

SQuirreL SQL is a graphica java app to view, browse data, issue SQL command of JDBC compliant databses. It has a generic plugin architecture, but comes with a standard plugin for MySQL (to support “DBMS specific capabilities”). Features: code completion, syntax highlightiing, graphs, script generation etc. (The installer ses IzPack www.isforge.com which I though was pretty slick). Took me a while to sort through the require mysql driver install - that could be easier (but easy for a fluent java/db user i’m sure). As a sql creator/syntax helper, its pretty good, but the install hassels left me tired.

phpMyAdmin (why not phpMySQLAdmin eh?) has been around since the stone age, and has had its share of exploits etc which always makes one wary. However, you can’t deny it’s a very useful web interface to mysql and is so packed with features I often turn to it for a quick alteration etc (if available - and that’s the pinch - it needs to be installed *and* maintained.). Also, it can be slow (hardware/network specific of course). Whenever I’ve set this one up i’ve always locked it up as much as i’ve known how (https, .htaccess, chmod -r until needed etc!). Bottom line I think: very useful, very popular (lots of award etc), strong features. Theme-able too… yikes.

“Short” blog eh? hehe.. well, hope it gets some interest. Let me know what you do!

04.06.06

Recent Blog List v2

Posted in general, web dev, byteclub at 1:40 am by Clinton

Yes - it’s there.
Last time I said there were some things I still wanted to complete on the byteclub blog roll, and so it is…

  • Posts ordered by most recent - DONE (although an edit to a post also causes update)
  • The title of the most recent post showing - DONE
  • Checked out the cache settings - DONE

Things still to be done (perhaps)

  • Show the number of comments next to each post title
  • Create an export RSS feed for those that want to aggregate our aggretated list.. :)
  • Get those monkeys showing
  • Add more blogs (internal and external)

There is still the issue of a better migration from the old data to these new wordpress setups. I have grand intention to create a wiki entry on how we can do that… (it would be great to still be able to get back the old comments…)

Here’s a call (I think an actual email will be in order) for those that either a) want a new blog on byteclub or b) would like their blog listed on the byteclub roll, then please let me know. There are still some of the past active bloggers that I want to contact, and I’m sorry to those that I haven’t asked yet - you can always contact me first!

In other news, Lucien and I have grand schemes for some unified admin, and I actually think that will happen sooner rather than later, simply because it’s really needed.

Finally, I have updated the code syntax highlighter extension for the swinbrain wiki (and i’ll move the new version to byteclub soon). This was inspired by John asking if the extension could be used elsewhere, and so I decided to add a fix and some features. Short versions: single line works, don’t need to add ‘Y’ all the time (it’s implicit if you specify line numbers - kinda obvious now…) and you can now ask for special “marking” of individual lines, or a *range* of lines… quite swish. :~)

Check out Swinbrain entry and the editing help page for more details if you are interested.

04.05.06

recent blog list - it’s back (almost)

Posted in web dev, byteclub at 1:44 am by Clinton

The top ten most recent byteclub post!

I had to have it back, and so i’ve spent some time coding once again in the name of happy monkeys!

It’s not quite complete. For starters I haven’t set up 10+ blog in the list :), and I need to tweak the CSS to get those monkey awards showing in IE and others, but the “how will I do that…” stuff is done! I would like to add the title of the lastest post for each blogger, and perhaps a comment count (which can also be gathered via rss).

It’s using MagpieRSS, (which uses snoopy for http client+proxy support). Nicely, Magpie is cacheing feeds (although I want to check the period of caching), but its pretty quick once the initial feeds were gathered.

So - getting there…

04.04.06

PHP short_open_tag?

Posted in web dev at 5:19 pm by Clinton

Reading a some material on php+best practices, and saw again the “don’t use short open tags, use long open tags”…. mantra. Eg.

// Do this 
<?php echo $print_this; ?>
// Not this 
<?=$print_this; ?>

Why why why? Yeah, xml support so that xml embedded in your php doesn’t start some confusion, but PHP is a scripting language for goodness sake, it’s short and it’s nice. Is this just like += ++ etc.? Cryptic for all of a few seconds then away you go. If I need the xml support then I’ll avoid short tags. Done. When I need it, i’ll be clear. So am I now down the path of “bad-practice”?

Well, just to cause a stir, I like short tags.
They’re concise, read well when using php like a “templating language” (another rant there) and I don’t need the all my php files to be xml safe (just print the ‘<?xml’ as a quoted string).

argh.

« Previous entries ·