[Nottingham] Debian/apache2/suphp problems

Graeme Fowler graeme at graemef.net
Mon Mar 12 11:56:01 GMT 2007


On Mon, 2007-03-12 at 11:42 +0000, Richard Hayes wrote:
> I tried this, and when I restart apache, it says:
> 
> ns:/etc/apache2# /etc/init.d/apache2 force-reload
> Forcing reload of web server: Apache2Syntax error on line 40 of 
> /etc/apache2/sites-enabled/domainarena.com:
> Invalid command 'suPHP_AddHandler', perhaps mis-spelled or defined by a 
> module not included in the server configuration

OK, so that means Apache isn't loading the module.

I have this in a global config file in /etc/httpd/conf.d/00_suphp.conf

## SuPHP configuration
# Load the module
LoadModule suphp_module modules/mod_suphp.so
# If it loads, do the rest of the magic
<IfModule mod_suphp.c>
  # turn on the engine
  suPHP_Engine on
  # set the config path
  suPHP_ConfigPath /usr/local/etc/suphp.conf
  # Define Apache handlers for appropriate filetypes
  AddHandler application/x-httpd-php .php .php3 .php4
  AddHandler application/x-suphp-cgi .cgi .pl
  # Define suPHP handlers for corresponding Apache handlers
  suPHP_AddHandler application/x-httpd-php
  suPHP_AddHandler application/x-suphp-cgi
</IfModule>


[note that I'm running my CGI scripts from suphp too, for consistency]

I'd start looking in your various config files to make sure you're (a)
getting the module loaded, and (b) assigning the handlers correctly.

Graeme




More information about the Nottingham mailing list