Installing mysql and PHP

Dec 13, '00 08:31:12AM

Contributed by: robg

[Editor's note: Revised to reflect new links on Matt's own site]

PHP and mysql, when used together, provide a rich environment for creating dynamic database driven web pages. PHP is a script-like programming language that contains features that make it quite easy to pull data from mysql databases and integrate them into web pages. As an example of what they can do together, this site is created dynamically by PHP serving data from a mysql database (using a prewritten program known as GeekLog). Unfortunately, PHP support is not included in the standard Apache install that ships with OS X PB, and mysql is not part of the UNIX core installed by the PB.

Matthew Vaughn has created pre-packaged versions of both mysql and PHP which are easily installed via the Apple installer. He's also got the original Apache compressed online, in case you want to reverse the install. If you're truly adventurous, he also has a page of instructions on how you can build both components by yourself.

Matthew points out a couple of minor glitches with mysql, but everything works. There are also a couple of good threads on the MacNN boards about installation and autostart scripts for mysql.

I've found that the PHP site is a great place to get a handle on the language, and I've picked up the "SAMS Teach Yourself PHP4 in 24 hours" book as a reference.

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20001213083112243