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
A brief and entirely incomplete HOW-TO forthe University of Texas’ PHP User’s Group
Using PHP onMac OS X
•http://developer.apple.com/internet/macosx/php.html
•http://www.phpmac.com/•The end.
Just read this article:
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...
•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...
•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...
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)
•http://www.entropy.ch/software/•http://www.aaronfaby.com/
Binary distributions
•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...
•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
•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...
•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
•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
•http://www.phpmac.com/•http://developer.apple.com/internet/
macosx/•http://www.macdevcenter.com/•http://fink.sourceforge.net/•http://osdir.com/
Useful Links
•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
•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
•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
•Got any?
Last words/Q & A