Hello,
I am trying to get my mac ready for drupal, but I am a bit stuck on the PHP part. I think I have sucessfully downloaded and installed MySQL, but I am very confused about the best way to install the necessary version of PHP. Many how to and tutorial sites (and the visual quickstart book i checked out fromt he library) recommend using Mark Liyanage's installer at http://www.entropy.ch/software/macosx/php/.. However, it seems that he is no longer providing support for Panther. The Visual Quickstart Guide has a graphic with a screen shot of Mark's site from a while ago, and it looks like once upon a time there was a PHP 5.0.0 for apache 1.3 installer designed for Panther, but now the options are different.

So, feeling confused about all of this, I decided to try to see if I already had PHP installed, and if so what version - I have heard that PHP is preinstalled with apache on some macs. So, I decided to try running the phpinfo.php script in my browser (http://localhost/phpinfo.php), but instead of running the script, the browser just displays the script [ phpinfo(); ]. I have also read that you can change some code in a file called httpd.conf file, but as I am a total Unix novice and not very familiar with using terminal, I have been very leary of this.

If anyone has advice or resources, I would be eternally grateful!!
Many thanks in advance,
Lauren

Comments

dgorton’s picture

It's been a while since a Mac was my primary machine, but there are several people in my office using PHP on Macs and I've done it myself as well (although it was a while back). So, after that disclaimer, a bit of googling produced this answer (which I now recall as having been my process as well):

From http://meta.wikimedia.org/wiki/Help:Running_MediaWiki_on_Mac_OS_X#Mac_OS...

On Mac OS X 10.3, PHP is installed by default but not enabled...
To do so, you just need to edit this file:

/etc/httpd/httpd.conf

Use the terminal program (Applications/Utilities), open a new shell (command-N), and type:

cd /etc/httpd/ 

then

pico httpd.conf

this will open up a simple text editor with commands (^ means control key) at the bottom

Uncomment (remove the preceding # characters from) the lines that contain

    "LoadModule php4_module libexec/httpd/libphp4.so"

and

    "AddModule mod_php4.c".

When you press Control-X you are asked if you want to save the changes, press Y to answer Yes. Now you will exit the program and your changes are saved. If you are unable to save the file after making edits, start over by typing

sudo pico httpd.conf

Then open the Sharing panel in System Preferences and stop and restart personal web sharing.

I know it sounds a bit daunting, but pico is a straightforward little text writing program and all you'll be doing with it is deleting a few '#'s and saving the file. I know it's a small step off into the unknown, but it's the only way I know of to do this other than using a distribution like the one you already found at http://www.entropy.ch/software/macosx/php/.

Hope that helps! If not, post back with follow ups.

Drew
Gorton Studios: http://www.gortonstudios.com
Some of our Drupal Sites: http://www.gortonstudios.com/portfolio/technologies/drupal

Roel Guldemond’s picture

hello Lauren and Drew,

What Drew describes is the way I succeed to get PHP 4.4.4 awake in my eMac, running OSX 10.3.9.

This forum helped me a lot.
You find in my topic "how first start Drupal on eMac 10.3?" in "Pre installation questions" of October 31, 2006 - 14:53, see: http://drupal.org/node/92197
The tip I could use the best was to read Maczealot's article "Installing Drupal on Tiger" at http://maczealots.com/tutorials/drupal/#step1

I have confidence that if you read these entries at a/m topic, it becomes more clear to you.
(Where I have my own questions on this topic, please check my questions of January 10th at this topic ( to be found at http://drupal.org/node/92197) :)

Best regards, Roel

*** I like contributing to improvement of systems. Hic sic: Boulding describes a system as: "that which is not chaos" ***