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
Testing Your Installation

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

If you built PHP as a script interpreter, verify that it is working correctly by creating and executing a test script such as the following:

    % cat <<EOP > script-test.php3
    > #!/usr/local/bin/php -q
    > <? echo "PHP script interpreter is OK!\n"; ?>
    > EOP
    % chmod 755 script-test.php3
    % ./script-test.php3
    PHP script interpreter is OK!
    %

The '-q' switch tells the interpreter to suppress the 'Content-type: text/html' line it ordinarily prints by default (because it assumes it's being run as a CGI script).

If PHP was built as an Apache module, the simplest way to test it is to create a file in the DocumentRoot that contains this single line:

    <? phpinfo(); ?>

and then fetch it in a browser. It should display a long and detailed Web page describing the PHP module, the extensions that were included when it was built, and the Apache environment as well.

Next: Going Further/In Conclusion »

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