[NTLUG:Discuss] Apache 2 and PHP 4 problem

Ryan Sweat ryans at cecentertainment.com
Thu Jan 2 14:22:55 CST 2003


On Thu, 2003-01-02 at 13:49, Alton R. Pouncey, II wrote:
> Hi all,
> 
> I am having an issue trying to get PHP 4.3.0 to work with Apache
> 2.0.43.  Here are the particulars of the system:
> 
> RH 7.2 (2.4.7-10 kernel)
> Apache 2.0.43
> Perl 5.8.0
> PHP 4.3.0
> 

> I have the following in httpd.conf:
> 
> LoadModule php4_module modules/libphp4.so
> <Files *.php>
>         SetOutputFilter PHP
>         SetInputFilter PHP
> </Files>
> 
> libphp4.so does exist in the Apache modules directory. I have the
> php.ini file in the correct directory for my setup and have not changed
> any settings in it from the default.
> 
> With the above setup, when I access a .php page on my system, I see the
> code, it is not executed.
> 
> If I add the following directive to httpd.conf:
> 
> AddType application/x-httpd-php php 

In my setup with Apache 2.x and PHP, I have the same config as you:

# grep -i php /usr/local/apache/conf/httpd.conf

LoadModule php4_module        modules/libphp4.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

However, I don't have this directive:

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

Try removing it and see if you have better luck.

Ryan





More information about the Discuss mailing list