1 / 17

Using PHP on Mac OS X

Using PHP on Mac OS X. A brief and entirely incomplete HOW-TO for the University of Texas’ PHP User’s Group. Just read this article:. http://developer.apple.com/internet/macosx/php.html http://www.phpmac.com/ The end. Just kidding. There are three ways to get PHP:

felcia
Download Presentation

Using PHP on Mac OS X

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using PHP onMac OS X • A brief and entirely incomplete HOW-TO for • the University of Texas’ PHP User’s Group

  2. Just read this article: • http://developer.apple.com/internet/macosx/php.html • http://www.phpmac.com/ • The end.

  3. Just kidding... • There are three ways to get PHP: • built it yourself (see previous article) • download a binary distribution • use what’s provided (Mac OS X Server)

  4. Built It Yourself... • Download Mac OS X Developer Tools from http://developer.apple.com/tools/ (requires free registration) • Read http://www.macdevcenter.com/pub/a/mac/collections/unix.html • Read http://developer.apple.com/internet/macosx/php.html

  5. Before you BIY... • Consider the following: • Using built-in Apache? Probably a good idea • Which options will you support? A few suggestions: • apache, inline-optimization, zlib, libjpeg, libpng, gd, mysql or pgsql, xml, apxs, dom • Are those installed? Where are the libs? If you use Fink, they’re mostly in /sw. Many others in /usr/local

  6. Document what config options you use! A good rule: use what is provided, print that out and save it • Use the “recommended” php.ini (http://cvs.php.net/co.php/php4/php.ini-recommended)

  7. Binary distributions • http://www.entropy.ch/software/ • http://www.aaronfaby.com/

  8. About binary dists... • Caveat emptor • Uncertain update schedule (possible delay for vulnerability updates) • Configuration may have missed something, or more likely took kitchen sink approach • Some platforms, may be linked to non-free libraries you can’t have (should use gnu!)

  9. Use what you’re given • Jaguar has Apache 1.3 with PHP 4.3 • Read http://www.macdevcenter.com/pub/a/mac/2002/01/04/apache_macosx_pt3.html

  10. Great! But... • Apple doesn’t update components frequently - usually security fixes only, unless it’s with an OS revision • You don’t get to chose config options • Doesn’t use recommended php.ini • Can you find any build documentation?

  11. OS X vs. OS X Server • No huge difference - it’s Apache 1.3.x either way • Mac OS X Server has cute GUI tools for configuring - use them, even if you’re a CLUI buff, otherwise you risk breaking updates • None of the 3rd-party installers clobber built-in configs, so be prepared to explicitly name directories, etc. (this is a good thing)

  12. PEAR • What is it? Kind of like CPAN • Support built into Jaguar • Read http://www.macdevcenter.com/pub/a/mac/2003/01/21/pear_macosx.html • http://pear.php.net/

  13. Useful Links • http://www.phpmac.com/ • http://developer.apple.com/internet/macosx/ • http://www.macdevcenter.com/ • http://fink.sourceforge.net/ • http://osdir.com/

  14. Fink • http://fink.sourceforge.net/ • Based on Debian dpkg/apt-get suite • Mac OSS community well represented • Fink Commander provides GUI wrapper: http://finkcommander.sourceforge.net/

  15. phpMyAdmin • http://www.phpmyadmin.net/ • Built in PHP (but not 5, nor mySQL 4.1 yet) • Download it to any PHP-enabled web server, edit config.inc.php and you’re done • Use .htaccess, and consider running under SSL cuz you’ll likely run it as SQL “root” user • Consider only starting it when you need it

  16. Apple Project Builder • http://developer.apple.com/internet/macosx/phpappledevtools.html • “Pretty” editor, with colors and code bracketing/formatting • Built-in CVS utilities - e.g. PEAR checkout • 2.1 “broke” pretty colors within PHP code, as near as I can tell :(

  17. Last words/Q & A • Got any?

More Related