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
- In Terminal: sudo cp /etc/php.ini.default /etc/php.ini
- Open /etc/php.ini in your preferred text editor.
- 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:
- stop using Safari and use Firefox instead for the setup (may not be vital but it is what I did)
- install phpMyAdmin (note instructions there are a bit vague as well but I managed)
- use phpMyAdmin to inspect the drupal database created earlier following the MacZealots instructions
- select all tables in this database and drop them
- 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.
Recent Comments