17
A brief and entirely incomplete HOW-TO for the University of Texas’ PHP User’s Group Using PHP on Mac OS X

Using PHP on Mac OS X

  • Upload
    felcia

  • View
    27

  • Download
    0

Embed Size (px)

DESCRIPTION

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: - PowerPoint PPT Presentation

Citation preview

Page 1: Using PHP on Mac OS X

A brief and entirely incomplete HOW-TO forthe University of Texas’ PHP User’s Group

Using PHP onMac OS X

Page 2: Using PHP on Mac OS X

•http://developer.apple.com/internet/macosx/php.html

•http://www.phpmac.com/•The end.

Just read this article:

Page 3: Using PHP on Mac OS X

There are three ways to get PHP:built it yourself (see previous article)download a binary distributionuse what’s provided (Mac OS X Server)

Just kidding...

Page 4: Using PHP on Mac OS X

•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

Built It Yourself...

Page 5: Using PHP on Mac OS X

•Consider the following:Using built-in Apache? Probably a good ideaWhich 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

Before you BIY...

Page 6: Using PHP on Mac OS X

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

Page 7: Using PHP on Mac OS X

•http://www.entropy.ch/software/•http://www.aaronfaby.com/

Binary distributions

Page 8: Using PHP on Mac OS X

•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!)

About binary dists...

Page 9: Using PHP on Mac OS X

•Jaguar has Apache 1.3 with PHP 4.3•Read

http://www.macdevcenter.com/pub/a/mac/2002/01/04/apache_macosx_pt3.html

Use what you’re given

Page 10: Using PHP on Mac OS X

•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?

Great! But...

Page 11: Using PHP on Mac OS X

•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)

OS X vs. OS X Server

Page 12: Using PHP on Mac OS X

•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/

PEAR

Page 13: Using PHP on Mac OS X

•http://www.phpmac.com/•http://developer.apple.com/internet/

macosx/•http://www.macdevcenter.com/•http://fink.sourceforge.net/•http://osdir.com/

Useful Links

Page 14: Using PHP on Mac OS X

•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/

Fink

Page 15: Using PHP on Mac OS X

•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

phpMyAdmin

Page 16: Using PHP on Mac OS X

•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 :(

Apple Project Builder

Page 17: Using PHP on Mac OS X

•Got any?

Last words/Q & A