Index syndication
comment syndication

Leopard, Apache2 and MySQL

MacBook Pro
I’ve just cloned this blog to a development version on my Macbook Pro. The Mac has Apache2 installed by default, so I just had to get mysql working.

Downloading MySQL and installing on Leopard is a breeze with the native package.

I migrated my database (dump/restore) and recreated my wordpress user, but still kept getting this error:

Error establishing a database connection

The user could log into the database from the console as shown:

lantrix@lexx:~ $ mysql -u wordpress -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 19
Server version: 5.1.34 MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use wordpress;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-----------------------------+
| Tables_in_wordpress         |
+-----------------------------+
| sk2_blacklist               |

So what is the problem?

Google provides an answer, with a log lived post from My Macinations providing the solution. It’s all to do with correcting your php.ini with the proper MySQL socket location.

Now, back to testing my new version of the Twitter Tags wordpress plugin. #hashtags now work!

Compiling readline on an OSX 10.5 intel x86_64

I’m stuck with a whole bunch of problems getting code to compile and co-operate nicely on my new MacBookPro. I’m compiling my own PHP, but it defaults to compiling for the i386 (32bit) architecure, which then fails when Apache2 running in 64bit mode tries to use the 32bit DSO for PHP5. Compiling PHP5 as 64bit then fails linking against the i386 pgsql lib, and so on. I really need everything using the x86_64 architecture.

How does this all relate to readline under Leopard?
Read the rest of this entry »

Using your MacBookPro to PXEBoot OpenBSD

This post does not show a successful outcome in case that’s what you where hoping for.

I was trying to get OpenBSD bootstrapped using the PXEBoot NIC in a server. I decided to use my Mac which has tftp and bootpd installed. This post is quite in depth and technical so if you are game then read on.
Read the rest of this entry »

Translation for the Mac by Kavasoft

About 24 months ago I purchased a version of KavaSoft’s Translation Service application for the Mac. With the recent move from my old Powerbook to my new MacBookPro the application stopped working. Apparently the licence is tied not just to your purchase but to the computer you installed it on.

As I had used the Apple migration tool to move everything across to the new laptop, Translation Service stopped working. I dropped an email to the developer and literally got an email response 60 minutes later with an updated licence.

Now that’s customer service! There is nothing like a Mac application developer to renew your faith in customer service. After dealing with so many large companies for other IT support issues (Telstra I’m looking at you) – it is very refreshing to get such a favourable response. I’m a happy user and can still translate the odd French or Italian comments on flickr photo-streams I look at.

There is an updated version of Translation Services called KavaServices which sells for $20 and it does a whole lot of other conversion as well. I’m nothing more than a happy customer. The application is perfect for quick on the fly internet based language translation, and even translate right in the browser. Seen here are before/after shots from a flickr photo page.

Before Translation
Before Translation
After Translationdirectly in the browser!
After Translation

Thanks Kavasoft for the enjoyable support experience.

Switching to multi-line mode using Textmate Regex

So you have a pattern you want to match across multiple lines, and you have a regular expression that matches it.
You will probably be used to doing this in perl like this:
/some.+?stuff/s
or using regex in ruby like this:
/some.+?stuff/m
However you have just started to get used to Textmate as an editor and you see it supports regex matching. Why though does it not use /s or /m for multi-line dot matching? The reason is that Textmate uses the Oniguruma regular expression library. Oniguruma requires switching to multi-line mode by using an extended group (?m:) so the dot matches the new line as well. So our pattern would be:
(?m:some.+?stuff)
Essentially doing this turns multi-line on for the sub-expression, being some.+?stuff
Make sense? I thought not. Read on about Textmate Regex for more information.

Next entries »