Home | Hardware | Internet News |Web Hosting |IT Management |Network Storage
LinuxPlanet
Search 
  Power Search | Tips 

 Front Door
 Discussion
 LinuxEngine
 Opinions
 Reports
 Reviews
 Tutorials
 News
 Technology Jobs

 Browse by subject.
Free Newsletter

Java/Open Source Daily
Linux Today
More Free Newsletters

Be a Commerce Partner


















internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Print this article
Email this article

   LinuxPlanet / Tutorials







Adding PHP to Apache on Linux
Building PHP for CGI Use

Ken Coar
Thursday, December 23, 1999 07:46:09 AM

Like Perl, PHP can be used in standalone scripts as well as embedded in Web pages. Unfortunately, to do both you will need to build it twice: once for each type of use. (Version 4 of PHP supposedly allows a single build to provide both the standalone script engine and the Apache module.)

Building the PHP script interpreter is very simple:

    % cd ./php/php3/
    % rm -f config.status config.cache
    % make clean
    % ./configure --enable-discard-path other-options
    % make
    % make install

(Performing the make install step requires write access to the /usr/local/bin directory, so you may need to execute it as root.)

The --enable-discard-path switch on the ./configure invocation is necessary to use PHP scripts as CGI scripts under a Web server, such as in the cgi-bin directory. To just invoke PHP scripts directly from shell command lines, you can omit it. Of course, it does no harm to include it, so you might as well.

Next: Building PHP as an Apache Module »

Skip Ahead

1 Supercharging Your Web Pages
2 Assumptions in This Article
3 How to Get PHP
4 PHP Extensions
5 Building PHP for CGI Use
6 Building PHP as an Apache Module
7 Building mod_php as a Dynamically Loaded Object
8 Testing Your Installation
9 Going Further/In Conclusion
10 Appendix A: Building Apache at Lightspeed
11 Appendix B: Apache Source Components Provided by Linux Distributions
12 Appendix C: Fixing Red Hat 6.1's apxs Script





Linux is a trademark of Linus Torvalds.


internet.com home | search | help! | about us

Jupiter Online Media

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers