Drupal (as well as PHP and MySQL) on an Intel iMac with OS X real quick

« posted April 19, 2006 - 8:47pm »

I run a dynamic website at work called Science Buzz all about breaking science news featuring a science blog among other things. Well, we wanted to show off the site at an upcoming conference but didn't want to have to pay the extortion level fees for a rather slow internet connection. Creating a static version of this large dynamic site on a kiosk proved to be rather difficult until I realized I didn't need to make it static just run it natively on the iMac as a local service.

So if you want to know how I got Drupal up and running on an Intel Processor based iMac read on: (the process was made much smoother by listening to Paul McCartney's Ram during the ordeal)

  1. Turn on the Web Server

    If your reading this you probably already know how to do this but:

    • Open 'System Preferences'
    • Select 'Sharing'
    • Go to the 'Services' tab and turn on 'Personal Web Sharing'
    • This will make all the files at '/Library/WebServer/Documents' live. You can see them in your browser by typing to 'localhost' into your browser bar. If you can't see the default Apache message when you do this...well, you've got something gunked up.
  2. Turn on PHP

    Well, normally I would just use one of Marc Liyanage's great PHP binaries. Unfortunately these only work on PowerPC(PPC) Macs and my iMac I needed to use was a newer Intel686 based machine. I guess Marc is working on a binary for Intel macs but don't hold your breath.

    Luckily the 10.4 OS that comes on the Intel iMacs already has PHP installed just not enabled. So you just need to enable it by:

    • Open /etc/httpd/httpd.conf in you favorite text editor
    • Remove the # before any lines containing PHP
    • Save the file. This will require a root password.

    This step stolen from the web-graphics blog

  3. Check PHP

    Again using your fav. text editor create a file at /Library/WebServer/Documents/phpinfo.php that looks like this:

    <?php phpinfo(); ?>

    If you don't see a screen that shows you a ton of info about your PHP install with a big purple bar at the top you've done something wrong.

  4. Install MySQL

      I wanted to use the newer 4.1 version of MySQL which, thank the stars, has already been compiled and turned into a OS X package by the good folks at MySQL.

    • Download the Mac OS X 10.4 (x86) Standard 4.1.18 package from the MySQL 4.1 download page.
    • Unpack the archive and run the instal package
    • Run the MySQLStartupItem package
    • Double-click the MySQL.prefPane to install this.

    I don't know if these steps are still nesc. but I did them anyways thanks to advice from Marc Liyanage's pages once again.

    • cd /usr/local/mysql
    • sudo chown -R mysql data/
      Root password needed here

    Now start it all up

    • sudo echo
    • sudo ./bin/mysqld_safe &
    • test it out by running /usr/local/mysql/bin/mysql test

    Ta-da! PHP and MySQL. Make sure to read up on securing your MySQL system. At bare minimum lock down the root account.
    /usr/local/mysql/bin/mysqladmin -u root password new_password_here

  5. Socket problems and the ugly hack

    If you try to write a PHP script in this environment that accessed the MySQL DB you would get socket errors. These two packages don't seem to perfectly talk to each other just yet. So I hacked a solution based on some wise comments over at web-graphics (comments 14-16). The fixes here work once but as soon as you restart seem to break. So I just forced this process to happen at the startup of the MySQL service.

    • Run mkdir /var/mysql
    • Open '/Library/StartupItems/MySQL/MySQL' in a text editor
    • At the end of the file add these lines:
      rm /var/mysql/mysql.sock
      ln /tmp/mysql.sock /var/mysql.sock

    This creates a symbolic link to the mysql socket file. I don't know why you need to redo this each time you start the service but that was the only way it would work for me.

The rest pretty much followed a standard Drupal installation. I had to go into the httpd.conf file and allow .htaccess files ful permission to get Drupal's "Clean URLs" to work but this isn't annything specific to the Mac. All in all much simpler than I thought it would be.


Thank's a lot sharing with

Thank's a lot sharing with us this conversion. I have yet to see any statement. If anyone has a link that would be great.

Thank's a lot sharing with us this conversion. I have yet to see any statement. If anyone has a link that would be great.

X Men silver jacket


It's been a while since I

It's been a while since I have actually discovered a blog worthwhile to be called a professional blog site.

Once again I will certainly see your blog
a lot more frequently and ideally you can also check
my blog as well as allow me recognize exactly what much more could I do to improve
it.


Planning to a standard

Planning to a standard school can already become tough for a few, so that produces hoping to get a school university on the web degree any tougher anyone to do. College & University


What is Brexit and what

What is Brexit and what would happen if Britain left the EU?It'll not only be a historic victory for Eurosceptics iF
Brexit is voted for by the people of Britain but it's going to transform this nation forever.
But what would happen? - https://www.youtube.com/watch?v=UTMxfAkxfQ0


99. Your situation: where

99. Your situation: where and when. This is in particular convenient individuals who travel regularly.


While looking for the ideal

While looking for the ideal possible online source regarding Video
gaming laptop computer computer systems I've stumbled upon your internet site and discovered
it helpful as well as actually appealing. I've learned a great
deal by simply reading few of your customers and also write-ups conversations and I wish you can continue creating even more
regarding this topic in the future for the advantage of other individuals.
I hope you could feature the most up to date laptop produced gaming on your following
upgrade.


Hi, i feel that i noticed

Hi, i feel that i noticed you visited my blog thus i came to go back the favor?.I'm trying to in finding issues to enhance
my site!I guess its ok to make use of some of your concepts!!

my web blog fuck pussy


people wont regrt, gov will

people wont regrt, gov will pay the price of blood
chris pratt Guardians of Galaxy 2 Jacket


As shortly as other folks

As shortly as other folks begin installing that afflicted program on their personal computers, the trojan finds it really is way inside and badly alters details stored inside the computers. Computer Virus


Computer trojan usually

Computer trojan usually sneaks into one's body without the notice. In order to avoid damage from your compromising of pc virus, you can easily try equally automatic and also manual removal solutions to completely eliminate the virus as well as other PC dangers. Computer Virus


A pc virus is destructive

A pc virus is destructive software built to spread to be able to other personal computers by applying herself directly into legitimate plans called "guests. inches Computer Virus


We realize the terms "Gaming

We realize the terms "Gaming Keyboards", but carry out we actually know very well what they are usually and what they could really carry out? Although we could read just what features are usually installed to them, we will not actually know very well what they are capable of doing. Gaming Keyboards


Where can I see the update

Where can I see the update of the store.? star wars finn jacket


It's been a while since I

It's been a while since I have actually discovered a blog deserving to be
called a professional blog site. Once more I will certainly visit
your blog a lot more frequently and hopefully
you can also inspect my blog site and allow me recognize just what more can I do to enhance it.


I would likewise persuade

I would likewise persuade pretty much every individual to spare this site page for any most loved help to support posted the appearance cigs coupon codes


It's been a while given that

It's been a while given that I have actually
discovered a blog deserving to be called a professional blog site.
I am really impressed on your design of writing and every words that you have composed are
quite understandable and also actually interesting.
I wish you would proceed sharing your knowledge
and suggestions to ensure that site visitors like us will find out more concerning this topic.
Once again I will visit your blog more often and with any luck you could additionally examine my blog site and let me
understand just what more could I do to improve it.


The trap jaw ant of

The trap jaw ant of testinside 150-810 Central and South America can open its jaws to 180 degrees and then slam them shut at over 110mph. The jaws slam shut so quickly that the whole ant can be flung many times its length into the air. 150-810 exam


ทางเราเข้

ทางเราเข้าอกเข้าใจ ทุกๆปัญหาที่ท่านสมาชิกต้องประสบในการ แทงบอล แทงบอลออนไลน์ การแทงบอลควรจะเป็นเรื่องไม่ยาก


They have a seriously

They have a seriously special mating technique. The male spreads out his fans and flares his gills to attempt to arouse
the female. The female will darken in colour when she becomes aroused.
A nest of bubbles will be produced near the surface by
the male.


It's been a while since I

It's been a while since I have actually found a blog deserving to be called a professional blog site.
I am actually satisfied on your design of writing as
well as every words that you have actually created are really simple to understand and really insightful.

I wish you would certainly continue discussing
your knowledge and concepts so that visitors like us will certainly find
out more regarding this topic. Again I will see your blog site
regularly and also hopefully you could also examine my blog site as well as allow me recognize exactly what
more could I do to improve it.


While looking for the very

While looking for the very best feasible online source concerning Video
gaming laptop computer computers I've stumbled upon your site and also discovered it truly fascinating and also useful.
I've found out a great deal by simply checking out few of your users as
well as short articles conversations as well as I hope you
could continue writing more regarding this topic in the future for
the benefit of other people. I wish you could feature
the current laptop computer systems created gaming on your following update.


. สรุป ในsbobet

. สรุป ในsbobet


. สรุป ในsbobet

. สรุป ในsbobet


Австралийский

Австралийский континент, австралия открыла военную базу в афганистане, сумчатые летяги.
Поведение человека, бенедикт спиноза как историк, философские взгляды джона локка.
Педикюр, маникюр, уход за ногтями.


Thanks for posting! Your job

Thanks for posting! Your job won't be left unnoticed and unappreciated. It helps me understand much in this sphere. I like the intelligible way you present information so that it became comprehensible, transparent and accessible for ordinary people as I am. Well done!


You must learn how to

You must learn how to resolve this problem right away before it's too
late. So make sure that you have some free time to concentrate on the game ' otherwise you are
doomed to fail. com to redress customer issues.


Hey. Very good, I was so

Hey. Very good, I was so suprised when I came upon this site. I would love to find a chat for installers to help and give opinions and compare prices in differant areas Thank you and keep up the good work. Help me! Can not find sites on the: Alavert. I found only this - Alavert laptop computers. Posts.. Authors.. Last post. Apr hello! I apr this is the site where we try to put you in touch with the music you just heard on tv, albeit in a tv ad, show or movie. Fotolog is the world leading generic synthroid online. Thanks for the help :mad:, Norman from India.


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • Images can be added to this post.
  • Insert Flickr images: [flickr-photo:id=230452326,size=s] or [flickr-photoset:id=72157594262419167,size=m].
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options