Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Installing mysql and PHP Apps
[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.
    •    
  • Currently 2.40 / 5
  You rated: 5 / 5 (10 votes cast)
 
[7,508 views]  

Installing mysql and PHP | 4 comments | Create New Account
Click here to return to the 'Installing mysql and PHP' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
very cool
Authored by: foamy on Dec 13, '00 01:58:37PM

I followed the thread on macnn and installed php and mysql. If you want to build dynamic websites or serve
data from a database then this is the way to go. It's pretty cryptic if you're a newbie like me, but once you get
it going it really feels like your mac is doing something it couldn't do before.

Even if you aren't serving pages from you mac, if you are a web designer and want to get started on dynamic
websites with PHP, it is a lot easier to sit down at your own computer and hack away than make changes,
upload them to the webhosting provider, test, repeat, repeat, repeat.



[ Reply to This | # ]
Learning PHP/mySQL
Authored by: robg on Dec 14, '00 10:58:59AM
One thing that's nice is the large number of absolutely free mySQL and PHP programs out there. I've learned most of what I know about the two just from playing around with the mySQL database and PHP code installed by Geeklog. Once I repartition the home drive (a long-delayed project), I'll be installing mySQL/PHP locally so that I can play around with newer versions of Geeklog prior to making them active on the site. One great source for PHP stuff is The PHP Resource Index They currently have almost 800 PHP resources online, covering everything from basic counters to programs such as Geeklog. Well worth a visit if you're interested in learning more about PHP. -rob.

[ Reply to This | # ]
books for mySQL & PHP & Perl
Authored by: tapella on Dec 16, '00 12:43:11AM
A looong time ago on Omnigroups' OSX-Talk list a guy posted a recommendation for:
-PHP Programming from Wrox Press
-MySQL book from New Riders


I haven't looked at either of these myself.


Personally, I picked up the Paul DuBois book 'MySQL' at Barnes and Noble a while ago
because I was going to run it on my Linux box at work, and that's also a good book. (And it
was on sale at B&N heh) I've seen this book recommended in several places. It's good for
people who aren't completely familiar with SQL or MySQL.


For Perl (ok a bit off topic, but not totally) you have to of course get the O'Reilly
Associates (ORA) books. Start with "Learning Perl" (also known as the Llama Book). The
blue one is current. After that is "Programming Perl" (aka the Camel Book). Again, blue is
current (v5). Pink is for an older version, but you should only see that as a used book.


Standard disclaimer: YMMV ;-)


[ Reply to This | # ]

books for mySQL & PHP & Perl
Authored by: Anonymous on Mar 17, '01 04:18:47PM

I'm really getting a lot of out of the Beginning PHP book from Wrox (This is different from their Professional PHP book, and is a better place to start IMHO).

Note: I may have the exact titles wrong, but they're approximate.



[ Reply to This | # ]