O'Reilly logo

Mac OS X in a Nutshell by Chris Stone, Chuck Toporek, Jason McIntosh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting Up DAMP

This section will help you decide on the language for your DAMP system (the P port), how to install and configure MySQL, and how to further configure Apache to use Perl and PHP.

Choosing a Language

You should probably have some proficiency in at least one of the “P” languages, even if your site is going to run code written by others. The following is a very brief rundown on the individual strengths of these languages.

PHP

PHP is the only language of the three designed entirely with web programming in mind; it boasts web-page embedability among its core features. It is arguably the best of the three for building very simple database-backed web applications, and may be the fastest to pick up and learn, given its ability to immediately show results in a web browser.

However, it’s very hard to extend, since adding new functionality means recompiling the PHP software itself; it isn’t modular, as Perl and Python are.

Perl

Perl is a general-purpose programming language that excels at handling text—since any web page is really just a long string of text, Perl has been a natural choice for crafting dynamic web sites for as long as the Web has existed.

Perl is the oldest of the three languages, with a history going all the way back into the 1980s. Without a doubt, it enjoys the most support. Anyone can extend Perl through writing modules (in either Perl or C), and the famous Comprehensive Perl Archive Network (CPAN, headquartered at http://www.cpan.org) serves as a globally ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required