SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast hellsgate's Avatar
    Join Date
    Jun 2004
    Location
    Greenock
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can't get PHP5 to run on Apache 1.3

    Lo folks.
    I'm trying to install Apache, PHP and MySQL on a Windows XP Service Pack 1 machine. Apache has installed ok (ie, when I go to 127.0.0.1 an index page comes up). When I try to run a PHP script it doesn't work, eg for this code:
    PHP Code:
    phpinfo(); 
    all that shows in the browser is this:
    <?php
    phpinfo();
    ?>
    I've put these lines into the httpd.conf file in Apache:
    ScriptAlias /php/ "c:/php/"
    # For PHP 5
    Action application/x-httpd-php "/php-cgi.exe"

    # specify the directory where php.ini is
    SetEnv PHPRC C:\WINDOWS

    This didn't give me any joy. Anyone have any ideas?

  2. #2
    SitePoint Evangelist
    Join Date
    May 2004
    Location
    Germany
    Posts
    550
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think you are missing
    Code:
    LoadModule php5_module D:/web/php5/php5apache.dll
    AddType application/x-httpd-php .php .php5
    not to sure about the Loadmodule, guess you want it running as cgi
    but AddType tells Apache what to do with files ending with .php/.php5

    hth

  3. #3
    SitePoint Zealot GWild's Avatar
    Join Date
    May 2005
    Location
    Colorado
    Posts
    159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi.

    I run php 5.0.3 and Apache 1.33 on my XP SP1 test box.

    In httpd.conf look for (as Daimaju suggested as well):
    Code:
    LoadModule php5_module "c:\php5\php5apache.dll" # near line 200
    AddModule mod_php5.c # near line 240
    AddType application/x-httpd-php .php #near line 730
    AddType application/x-httpd-php-source .phps #near line 730 if you want to display php source files.
    Those settings, in general, should get you running. Note that you may, of course, have to change the paths to match your XP install.


    -hth-
    Lang ist der weg und hart,
    das aus der hoelle fuehrt auf zum licht.


    My Site

  4. #4
    SitePoint Enthusiast hellsgate's Avatar
    Join Date
    Jun 2004
    Location
    Greenock
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yet again the Sitepoint members come through. Thanks very much guys. You've stopped a lot of hair-pulling.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •