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
Going Further/In Conclusion

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

With PHP installed and working, what do you do then? Well, that's really up to you—but for a couple of examples of what's possible, check out the PHP site itself and the ApacheCon 2000 site. The PHP site is totally driven by the software; as you browse through the online documentation, you can see that not only is it 'live,' meaning that you can comment on it or make suggestions for improvements, but you can also see what other people have suggested. The ApacheCon 2000 site uses PHP to display the very latest information on sessions, speakers, sponsors, and other aspects of the conference, building each page when it's requested from the data, stored in a MySQL database.

The documentation link at the PHP site is invaluable. While it doesn't give a lot of guidance on how to accomplish things, it's very complete when it comes to descriptions of the PHP functions. For more, check USENET or the PHP mailing lists.

One final trick, which is illustrated at the PHP site, is to add the 'show me the source' feature to your server. Add a line like this to your /usr/local/web/apache/conf/httpd.conf file:

    AddType application/x-httpd-php3-source .phps

and then soft-linka .php3 files to the same name with a .phps extension, as with

    % ln -s some-php-file.php3 some-php-file.phps

Requesting the .phps file in a Web browser will display the source of a PHP (or PHP-enabled HTML) file, nicely color-coded.

In Conclusion

If running the Apache Web server and wanting to make your Web pages more interactive, responsive, personalised or otherwise to "spice them up," PHP is an easy and excellent way to do it. The software is under constant intense scrutiny by dozens of developers, so problems are fixed quite quickly.

Got a Topic You Want Covered?

If you have a particular Apache-related topic that you'd like covered in a future article in this column, please let me know at <coar@Apache.Org>. I do read and answer my email, usually within a few hours (although a few days may pass if I'm travelling or my mail volume is way up). If I don't respond within what seems to be a reasonable amount of time, ping me again!

Next: Appendix A: Building Apache at Lightspeed »

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