#native_company# #native_desc#

Two PHP’s are better than one Page 2

By Michael Galloway
on August 19, 2002

Step Two: Multiple PHP Builds

Now that you have the correct structure it is time to
create the different builds of PHP. The key here is to compile them
as a CGI version, not the Apache module. I know, I know, there are
some security risks, but the payoff far outweighs the risk. This
does mean, however, you should be much more conscious about your
code, and CGI data (but you all are anyway, so I’m wasting my
keystrokes as it were). For the moment, since you are going to be
using one PHP as a test point for your new module, just create two
identical (and functioning) PHP builds.
just copy the same PHP build. You should have two separate
directories of PHP source. Since you will be using one PHP source
for your new module additions, you will be making a lot of changes to
the folders in the directories. If you should accidentally overwrite
your stable PHP version in the future, you will wish you had an
untouched PHP directory set so that you could just compile another
one. Considering that reengagement time is crucial when anything
happens to a commercial webserver, the additional resource
expenditure is completely justified.
So now you
have two files called “php” on your drive. Move them to the
directory that you setup for the builds (you might consider renaming
the PHP’s for identity purposes?? something like “php.stable” and
“php.test” would work).
Now link the correct
binary to the correct domain by going into the php directory of each
domain and creating a link called “php” (ln /path/to/php/php.stable