Archive for November, 2007

PHP development on a Mac, Part 1

At the moment I have an updated version of Mac OS 10.4 running on my MacBook and as you probably know,
Apache and PHP are preinstalled.

I started developing on a Mac along time ago,
and never needed any PHP upgrade as I never did any extensive development on my local machine.
But now I really needed a development environment with the latest Wordpress running on my Mac
and this required MySQL.

I ran into several problems and it seems that installing everything you need is the main culprit.

Starting your webserver on a Mac is easy.
This is integrated in the System Preferences under Internet and network > Sharing > Services > activate the option Personal Web Sharing or start up terminal and type:

sudo apachectl -graceful


Yes you need root permissions to do this

MySQL is needed too: download the universal package from the MySQL download page, and install. The installer will ask you for your administrator password, but everything should install without any problem.

The dmg package includes an item for the System Preferences that will allow you to stop and start the MySQL server exactly as you can stop/start the webserver. Command line does the trick too, but I try to stay out of terminal for these things so you better install that one too.

After that, download the MySQL tools: MySQL Administrator andMySQL Query browser

Once you installed the database server, you can download Wordpress, unzip the files and copy these to the webserver directory: /library/webserver/documents

The installation of Wordpress requires you to create a new database: use the MySQL administrator to create a new database and update the Wordpress config file.

Now when you install MySQL by default and try to use the PHP module preinstalled to connect to this database
you will notice … nothing. You cannot connect because the default directory for MySQL and PHP MySQL support, point to different directories.

So you have to change that.

You can read all about it on developer.apple.com
but if you follow the list below:

  • open up terminal
  • type: locate php.ini
  • open the file that was found, probably: /private/etc/php.ini
  • change the lines
    • mysql.default_socket = /var/mysql/mysql.sock
      into
    • mysql.default_socket = “/tmp/mysql.sock”
  • restart Apache

And try to reconnect to your database.

Everything should be ok now, at least up to here, because I have some more problems and I will be posting more on this topic as it is not that easy to get everything running once you start to fiddle with terminal and unix stuff.

A webmasters’ time and resources are limited

Webmasters’, IA’s and other computer power users are continuously facing the reality of scarce resources and little time to manage them.
It is as if people who work with computers are the culprit of “the active users’ paradox”.
If you don’t know what this paradox is, have a look at Bokardo’s post on the subject but it basically comes down to the following:

The “paradox of the active user” is a paradox because users would save time in the long term by taking some initial time to optimize the system and learn more about it.

Paradox of the Active User (Alertbox Sidebar)

If I have a job to do, let’s say create a content inventory, I could go through the website, create the sitemap and content inventory by hand or …
I could learn a bit more about vbscript, excel and visio and create both in one go.

If I automate, I save time. In this case, I can make a better decision on which pages I really have to read. I don’t have to go through each and every page.

There are probably a thousand example like this:

  • corporate system admins writing scripts to install PC’s,
  • batch files to connect to shared drives,
  • managers trying to cramp everything in an excel file and run vbscript reports on the figures,
  • me trying to create a script that generates an Umbraco website package from my excel content inventory, which I can import (Anybody? please mail me :-)

Either you do it manually, or you study and automate.

I tend to go for the latter, but that is because I prefer to do new things instead of struggling through the routine of doing something over and over again.
If I calculate the time spent, I end up with the same amount or even more time spent.

Just make sure that this job is not the first or last time you have to do this and in the end you will be spending less time doing routine jobs.

CSS, Personas and IA blogs

Old posts are supposed to be a good way to keep the interest level up for your blog. And I did find some articles which I completely forgot about, so this is a good time to bring them back to your attention.

I managed to go back to November 2003 and reviewed an article I wrote back then about CSS as a debugging tool for templates. This is a little theoretical, but three years later I wrote an article on how to implement this technique:


Personas is another topic which I touched several times and you can still download a tool to help you create personas:


And to finish, you should have a look at all the articles my European colleagues managed to write during my absence. Only one of the blogs mentioned in the article is no longer available, which IMHO, is quite an achievement on their part.

Time out. Tune in. Turn up.

26102007541.jpg

People sleeping in the train station, saves the trip in the morning :-)

My latest post was in August 2006, and it took me some time to get back on my feet. Those who now me in real life, know why. I returned a few weeks ago from a long trip to Asia and for now, I am trying to get used to the quietness and grayness of this little country.

I wanted to go to India for some time now and finally made the decision. I can say it was worth all the trouble.
I don’t take pictures in general, but India is so strange/beautiful/amazing at the same time, you really cannot afford not to take photographs.
If you look at the pictures below, imagine the smell of garbage/exhaust fumes/flowers and spices, combine lots of noise, horns,cows, people, shake and enjoy.

23102007535.jpg

Pani pura, the best snack ever on the streets of Bombay

The wordpress upgrade to v2 worked without any problems, as usual, and because of that I had to go through some of the posts and reorganise a little. I found some good articles which I will be reviewing and posting as a starter

Categories

About

My name is Len Dierickx and this is my personal blog. I studied Musicology at the UG, long time ago but got more and more into webdevelopment. I started this blog because the EuroIA summit in Brussels (Belgium, Oct 2005), was such an inspiration. And I was thinking about a blog on IA a while now, so that was the extra kick I needed to get it actually done.

Powered by WordPress