PHPBuilder - Two PHP's are better than one Page 2

RSS Twitter

Two PHP's are better than one - Page 2

by: Michael Galloway
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.
Don't 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 php)

« Previous Page
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Michael Galloway



(Maximum characters: 1200). You have characters left.