PHP on Mac OS X
Pages: 1, 2
--with-xml flag works without any additional configuration.
WDDX support works if the
--enable-wddx flag is included. XML support must be included for WDDX to function.
GD can be a bit tricky to configure the first time through. A few non-intuitive modifications or flags are needed to get all of the packages involved in GD to compile together. However, Scott Anguish at Stepwise.com has supplied a nice set of instructions that ease the process. Copy his commands into your terminal window, then compile PHP using the following flags:
--with-gd=[DIR] --with-jpeg-dir=[DIR] --with-png-dir=[DIR]
To install PDF support, it is necessary to install the TIFF libraries. Before you can install the TIFF libraries, you will need to replace the
config.sub files that come with this package. You can find more recent copies of these files that work with OS X in
/usr/libexec. You also need the JPEG libraries. Instructions on installing those are included in Stepwise's GD instructions.
Version 3.5.6 of the TIFF library has a nice interactive install process that prompts you as to whether the directories it's found to install in are correct. Currently, the configure process works, but dies during the
make process, giving the following error:
/usr/bin/install: /Library/Perl/libpdflib_pl.dylib: No such file or
make: *** [install] Error 1
To work around this error, you can copy the files in the
pdflib-4.0.1/bind/perl/.libs/libpdflib_pl.dylib directory to
/System/Library/Perl. Then create a symbolic link to the directory the
make process is looking for:
sudo ln -s /System/Library/Perl/Library
At this point, the
make process will work, and you can finish the install. You can compile PDF support into PHP using the following flag:
The cURL client libraries offer a way to conduct transactions of https, among other things. The current source compiles and installs into PHP without issue. You can compile cURL then include it in PHP with the following flag:
The PHP extensions discussed here are all that most PHP developers will need. However, if you need additional support compiled into PHP, chances are that the module you need will work. If it doesn't work immediately, you can always hit the mailing lists. Those who maintain the code will most likely be happy to help you get it working on the Mac platform.
Editor's Note: This article is the first in a series of cooperative tutorials with the Apple Developer Connection. If you have comments, additions, tips, or clarifications, I encourage you to use our Talk Back feature so that your ideas can be shared with O'Reilly Network readers.
Jay Greenspan is a contributing author for Apple Developer Connection.
Return to the Mac DevCenter.
2005-12-27 12:22:34 NewMacUser [View]
support of dl()
2003-02-23 23:41:15 tychay [View]
2001-08-16 08:08:18 weberik [View]
2001-07-29 05:09:00 archangel23 [View]