<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Mac OS X installs
This section contains notes and hints specific to installing php on Mac OS X.
There are a few pre-packaged and pre-compiled versions of php for Mac OS X. This can greatly assist in setting up a standard configuration, but if you need to have a different set of features (such as a secure server, or a different database driver), you may need to build php and/or your web server yourself. If you are unfamiliar with building and compiling your own software, it's worth investigating whether or not somebody has already built a packaged version of php with the features you need. Lightyear Design offers a pre-built version of php for OS X, as does Tenon Intersystems.
Compiling for OS X server
There are two slightly different versions of Mac OS X, client and server. The following is for OS X Server.
Example 2-3. Mac OS X server install
1. Get the latest distributions of Apache and php
2. Untar them, and run the configure program on Apache like so.
4. You may also want to add this line:
If you want the compiler to do some optimization.
5. Next, go to the php4 source directory and configure it.
If you have any other addiitons (MySQL, GD, etc.), be sure to add
them here. For the --with-apache string, put in the path to your
apache source directory, for example "/src/apache_1.3.12".
7. make install
This will add a directory to your Apache source directory under
8. Now, reconfigure Apache to build in php4.
You may get a message telling you that libmodphp4.a is out of date.
If so, go to the src/modules/php4 directory inside your apache
source directory and run this command:
Then go back to the root of the apache source directory and run the
above configure command again. That'll bring the link table up to
10. make install
11. copy and rename the php.ini-dist file to your "bin" directory from your
php4 source directory:
cp php.ini-dist /usr/local/bin/php.ini
or (if your don't have a local directory)
cp php.ini-dist /usr/bin/php.ini