I've successfully compiled Apache2 with PHP4 as a DSO. My httpd.conf has the lines :

LoadModule php4_module modules/libphp4.so

<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>

but when I try to load info.php containing <?PHP phpinfo(); ?>
it simply loads it in plain text.

Can anyone tell me why ?

    Well thank you for the help.. I'll repost a more complete help request now.. last one was well.. incomplete..

    System: Linux (slackware 8)
    With: Apache2, PHP4.2

    Apache2 && PHP4.2 configured, and Apache run
    .php files open as plain text files

    httpd.conf contains:

    LoadModule php4_module modules/libphp4.so
    #<Files *.php>

    SetOutputFilter PHP

    SetInputFilter PHP

    #</Files>
    (without the # of course)

    And that is that, if anyone knows what the prob is please post.. thanks.

      Did you try adding this instead:

      AddType application/x-httpd-php .php

      I\'ve not done this on my Linux box yet, but seems to work on the windows binaries.

        I use this in my httpd.conf configuration file. With this you can get the phpinfo(); result that yo expect.

        LoadModule php4_module C:/php/experimental/apache2filter.dll

        PHP

        #AddModule mod_php4.c
        AddType application/x-httpd-php .php .htm .html .php3 .php4
        <Files *.php>
        SetOutputFilter PHP
        SetInputFilter PHP
        </Files>

          PHP 4.2 doesn't work neighter on my Linux box, but PHP 4.3_dev will work with Apache 2.0.35. The only thing I need to figure out is how to use global variables.
          Remy

            Write a Reply...