faqts : Computers : Programming : Languages : PHP : Installation and Setup : Web Servers : Apache

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 12 people (25%) answered Yes
Recently 2 of 10 people (20%) answered Yes

Entry

PHP: Apache: How to run PHP via your Apache web server?

Feb 12th, 2005 14:06
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 13 February 2005 - 04:04 am -------------------

PHP: Apache: How to run PHP via your Apache web server?

---

Steps: Overview:

 1. -Make sure PHP is enabled on your web server

     1. Install Apache, if applicable

     2. Make sure Apache runs

        1. type e.g. the name of the Apache executable
           in a console (e.g. MSDOS box)

            c:\apache\apache.exe

           (adapt this path to the conditions on your computer)

           and leave this console (e.g. MSDOS box) open and running
           (so do not close it, as the web server has to
            stay active)

        -- or --

        2. Run Apache as a service

 2. -Test if the web server is indeed active

     1. Open your browser

     2. Type the url:

         http://localhost

     3. This should show the index page for your web server
        in your browser

        If it does not show,

        1. recheck the installation of Apache

        (e.g. fill in the correct settings in the file
          c:\apache\conf\httpd.conf)

       (adapt this path to the conditions on your computer)

        2. make sure Apache runs

 3. -Create a php test file:

     1. Create in your favorite text editor a file containing the text:

--- cut here: begin --------------------------------------------------

          <?php phpinfo(); ?>

--- cut here: end ----------------------------------------------------

     2. Save this with the extension .php
        in the home directory:

        e.g.

         c:\apache\htdocs\<your filename>.php

        for example:

         c:\apache\htdocs\ddd.php

       (adapt this path to the conditions on your computer)

 4. -Now test your test page, which will show the version

     1. Open your browser

     2. Type the url:

         http://localhost/<your filename>.php

        e.g.

         http://localhost/ddd.php

     3. You should then see in the HTML page the version
        of the currently PHP mentioned, say on the top
        of the html page, e.g.

         PHP Version 4.0.5

        -- or --

         PHP Version 4.3.4

        -- or --

         PHP Version 5.x

        and so on.

        Note:

        If you do not see anything or get a page not found message in
        your browser check if PHP is enabled in your Apache web server.

---
---

Internet: see also:

---

Operating system: Microsoft Windows: WAMP: Link: Overview: Can you 
give an overview of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/33803/fid/772

----------------------------------------------------------------------