[TriLUG] Strange PHP problem

Rick DeNatale rick.denatale at gmail.com
Tue May 16 14:23:25 EDT 2006


On 5/16/06, Matt Nash <mattnash at intrex.net> wrote:
> Thanks for your quick response, Dave.
>
> '/usr/sbin/apache2 -l' does not list php or php5.  However,
> '/usr/sbin/a2enmod php5' returns 'This module is already enabled!'.
> When I look at the / directory listing on my browser, the bottom line
> reads "Apache/2.0.55 (Ubuntu) PHP/5.1.2-1ubuntu2 Server at stewbuntu
> Port 80"
>
> Adding a LoadModule directive to apache2.conf for libphp5.so results in
> a warning that the module is already loaded.
>
> I tried copying php.ini to /etc/apache2/conf.d but restarting apache
> resulted in an error indicating it couldn't parse the file.
>
> There is an AddType line already in apache2.conf for php.  Adjusting the
> defined name of this type has no effect on the error message.

In a debian based installation (e.g. Ubuntu) you shouldn't make those
changes directly in /etc/apache2/apache2.conf  control over which
modules enabled is via the /etc/apache2/mods-enabled directory which
in turn has symlinks to the real module.load and module.conf files in
/etc/apache2/mods-available.  The apache2.conf pulls these in at the
proper time.

$ grep enabled /etc/apache2/apache2.conf
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
Include /etc/apache2/sites-enabled/[^.#]*

sites-enabled is intended for configuration files for virtual hosts.

There's a little more to understand than, say, an apache installation
in redhat, but the structure has a lot of advantages in being able to
modularize and control the configuration.

-- 
Rick DeNatale

IPMS/USA Region 12 Coordinator
http://ipmsr12.denhaven2.com/

Visit the Project Mercury Wiki Site
http://www.mercuryspacecraft.com/



More information about the TriLUG mailing list