Tuesday, March 20, 2007

 

Moved!

I've moved this blog to Mac Geek.co.za and am posting there fairly regularly, about Apple Macs, open source and random websites.

Tuesday, September 05, 2006

 

Upgrading mysql on Tiger

After a system crash I've bought a MacBookPro and have ALL of my settings and preferences imported onto it from my iBook (running 10.3.9). The only thing that hasn't come across seamlessly (so far?) is mysql. Apparently there are different binaries for Panther and Tiger, so I need to reinstall.

First, I removed the old mysql from my system by backing up the following to a "mysql old" folder:

/Library/MySQL
/Library/StartupItems/MySQL
/Library/Receipts/MySQL.pkg

This at least means I have a full backup of my data.

Secondly, I downloaded the binary from dev.mysql.com and installed it. I could've used mysql 5 but am sticking with 4 because I like it (and because all of my old tables are in that format - I don't have sql exported versions I can use for importing).

Installed mysql-standard, the MySQLStartupItem and the MySQL.prefPane (for controlling mysql through System Preferences). Then I started mysql through terminal (open it up, type "cd /usr/local/mysql" then "sudo ./bin/mysqld_safe" and it should start up) although the instructions I'm following advocate a full reboot. Seeing that I can't seem to get php talking to mysql, reboot time it is.

After rebooting although ./bin/mysqlcheck -p -A -r now works, I still can't get apache/php talking to mysql. Downloaded a Dashboard app called TailDash which gives me the output of my log files (httpd, error_log etc). Nothing obvious.

Ah ha! According to a comment at MacDevCenter, "After updating to Mac OS X 10.4.4, you may find that the connection between PHP and MySQL running on your local webserver is broken. Apparently the socket file got moved in the update." (see osxhints article)

The fix is quite simple:

sudo mkdir -p /var/mysql
sudo chgrp mysql /var/mysql
sudo chmod g+w /var/mysql

edit/create /private/etc/my.cnf and add the lines:

[mysqld]
socket=/var/mysql/mysql.sock
[client]
socket=/var/mysql/mysql.sock

restart mysql

And it works! Hooray!

Technorati Tags: , , ,


Saturday, August 19, 2006

 

How to find your flickr user id

Simply visit http://idgettr.com/

Technorati Tags:


Friday, August 18, 2006

 

BarCamp Johannesburg



See you there!

Technorati Tags: , ,


Tuesday, August 08, 2006

 

Using Firefox as an html editor

Here's a tip courtesy of Lorelle:
Get and install the two free add-on Extensions for Firefox: Edit CSS and Web Development Tools.

Technorati Tags:


 

Using Wordpress as a CMS

I wanted to define a custom home page on a Wordpress site, then link to the actual blog itself. A bit of a mission, but this helped:
http://codex.wordpress.org/Pages#Using_a_Page_as_the_Front_Page

I created a page called "Home" which had my home info on it.

Using the Static Front Page Plugin, it is possible to set any Page as the "front page" of your site. The plugin modifies the home page query and sticks the Page with a Page slug of "home" to the front page.
I then created blog.php in my theme folder, with the following content:
<?php /* Template Name: Blog */ ?> <?php query_posts('cat=-0'); //gets all posts load_template( TEMPLATEPATH . '/index.php'); //loads index ?>
Now, log into Wordpress and create a page named "Blog" with template "blog". Also updated my permalinks to begin with "blog" like so:
"/blog/%year%/%monthnum%/%postname%/".
Wordpress is a bit more powerful than I thought!

Technorati Tags: , ,


Wednesday, March 08, 2006

 

How to run Windows under OS X

Of course with the release of the Intel Macs the race is on to run Windows XP natively on a Mac. However, it's fairly simple to run it under OS X - for the princely sum of $25. WinTel is a product which will let you do that, along with their XP installation guide.

Thursday, March 02, 2006

 

Who to vote for? Some remarks on design

It's almost 2pm on March 1st, local government election day. Being someone who doesn't follow politics much and yet wants to make an informed vote I did the only logical thing: I visited elections.org.za to find the websites of all the political parties and see how they rank. Summary: sorely disappointing.

The Freedom Front Plus: Afrikaans only - doesn't cater for any other languages.
United Democratic Movement: this site is visually repellent (and that's the nicest I can be).
They've tiled an image across the top of the page which clashes on the eyes. However, their election manifesto reads really wel
l. United Christian Democratic Party: the only site which addresses the elections directly on the front page - but it was completely insufficient.
Minority Front: site and graphics designed in Microsoft Word. The graphic for "Why vote MF?" reminds me of viagra spam. Good luck to you guys!
New National Party: this one is interesting. Their site is actually just the Western Cape site with most of their core commitments focussed on results for that province. The link to their national site reflects a page which says "This will soon be the new home of the domain www.stanleyisland.co.za." Thanks for the laughs!
IFP: one of the more decent sites. The 3 key words on the front page are: "Honour, Service, Delivery." I've heard that somewhere before.
Democratic Alliance: ah, yes - this is where I've heard that before. Also the only party which has a podcast (!). Can't imagine anything more boring. But, perhaps I'll listen and let you know what I think...
Azapo: probably the most creatively designed site. Black and yellow all the way but politically, I just am not all that stoked about "Azania." Plus I enjoyed the misspelling of "Discliamer" at the bottom of the home page.
The Independent Democrats have the most creative single page - you can download ringtones and cellphone wallpaper - the latter comes in all shapes and sizes of "Patricia for President!" which I find hilarious - and very well done. They're the only site to have a blog (albeit one which has no entries) and a forum (which doesn't work) but I have to give them points for at least aiming in the right direction.
Vryheidsfront Plus is one of the better designs - they even use flash on the front page! (not that it's used to do anything, really, but still - points). You can also view the site on a whole bunch of languages - English, French (!), German (!), Russian (!), Setswana, Spanish (!), Zulu. I'm sure all the Russians in SA are pretty chuffed about that.
The ANC site is pretty decent and that's all I have to say about that.

What interests me the most about all of the parties contesting in the elections is the number of parties with "Christian" in their name. From the elections.org.za page:

AFRICAN CHRISTIAN ALLIANCE-AFRIKANER CHRISTEN ALLIANSIE - ACA
AFRICAN CHRISTIAN DEMOCRATIC PARTY - ACDP
CHRISTEN PARTY/CHRISTIAN PARTY - CP
CHRISTIAN CHAMPION PARTY - CCP
CHRISTIAN DEMOCRATIC PARTY - CDP
CHRISTIAN FRONT - CF
NATIONAL CHRISTIAN DEMOCRATIC PARTY - N.C.D.P
UNITED CHRISTIAN DEMOCRATIC PARTY - UCDP

And throw in the God's People's Party too.

Technorati Tags: , , , , , , , , , , , , , ,


This page is powered by Blogger. Isn't yours?