Drupal on a Mac – not quite as easy as I hoped

For a couple of reasons I decided to install Drupal on my Macbook: it seems to have become the prototyping tool of choice in the OU; I am thinking about using the ejournal module for the journal I edit JIME; and, I had too much real work to do so a distraction was in order. I did succeed in installing it after a couple of days but with some strange problems on the way. As usual Google searches supplied the answer but it took a few places so I thought it worth gathering the information here. To be precise what I did on 1st May 2008 was:

  • On an Intel Macbook (2GHz/1Gb/120Gb) running OS X 10.4.11 Tiger.
  • Using Mac supplied Apache 1.3.33 and PHP 4.4.7
  • Install Drupal 6.2
  • Which needed mysql 5.0.51b
  • And also I need phpMyAdmin 2.11.6

I followed the instructions at MacZealots on Installing Drupal on Tiger which starts by enabling Apache then getting the software, I installed the latest version of Drupal (6.2) and mysql (5.0.51b) rather than the older versions in the tutorial. It went fine upto this line:

/usr/local/mysql/bin/mysql -u root -p drupal </Library/WebServer/Documents/drupal/database/database.mysql

The skeleton database.mysql does not exist – so ignore the error message and carry on with the next part to enable PHP on the Mac.

But the php does not talk properly to the mysql – this is explained in an Apple support message. But a variant is needed of the steps described there – I did

  1. In Terminal: sudo cp /etc/php.ini.default /etc/php.ini
  2. Open /etc/php.ini in your preferred text editor.
  3. Find the [MySQL] section, and change the mysql.default_socket directive:
         mysql.default_socket = /tmp/mysql.sock

When it came to configuring Drupal though things also went a bit wrong. The manual configuration in the macZealots page seems to have been replaced with configuration via the browser so can be skipped. But accessing drupal as http://localhost/drupal gave some error messages. Most of these refer to permissions which can be fixed by changing permissions on files – page at drupal.org suggested chmod to give access, I preferred chown -R www – but in each case be wary of security issues (minimal on my laptop). I then hit failure with an error message referring to:

ORDER BY fit DESC LIMIT 0, 1′ at line 1 query: SELECT * FROM menu_router

Googling for this phrase took me to this forum discussion at drupal.org which has some good suggestions but did not spell out the solution which for me was to:

  1. stop using Safari and use Firefox instead for the setup (may not be vital but it is what I did)
  2. install phpMyAdmin (note instructions there are a bit vague as well but I managed)
  3. use phpMyAdmin to inspect the drupal database created earlier following the MacZealots instructions
  4. select all tables in this database and drop them
  5. open http://localhost/drupal/install.php to restart the configuration

After that things got better – a few more directories needed permission changed and I haven’t worked out how to enable the GD graphics library but I am now away and happy. Just need to work out what to do with Drupal.

I hope listing this might help someone (or me when I come to do it again). Some bits are from memory so I hope they are right.

About these ads

4 Responses to Drupal on a Mac – not quite as easy as I hoped

  1. Alex says:

    Hi Patrick,

    Not sure if installing MAMP first (http://www.mamp.info/en/index.php – Mac + Apache + MySQL + PHP) – might’ve made things easier as you wouldn’t have had the headaches of getting PHP and MySQL working together?

    Alex

  2. Patrick says:

    Thanks for the advice Alex. It probably would be better to start clean like that. But actually I think the main problem is something not quite right in the 6.2 setup as others are having problems not just Mac users.
    Anyway I am having to switch to 5.7 to try to get the ejournal module to work. So I will see if that is a straightforward change.

  3. Patrick says:

    Just as an update to Alex’s comment and also from Juliette via twitter – the Drupal 5.7 install was bug free. Ejournal module now installed, but not sure it provides enough tools to give me a journal platform out of the box. Will need to play a bit more to see.

  4. kimbakat says:

    I don’t know why that can’t figure out a sure-fire method to get this shit installed. I’ve wasted 2 days to just to figure out how and why the Install.php file does not load. Working on Day 3..I may give up on the project in about another day.

    Drupal has been a colossal waste of time. It is not a simple procedure. It’s a shame..because they COULD make it simple.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: