Those are just the configure file for the suphp module. …

Friday, 29th March 2024

Comment on Installing SuPHP on Debian Lenny 5.04 with Apache 2.2.9 by Maurice.

those are just the configure file for the suphp module. But no worries. it seems to be working. It seems that magento 1.5 is quite buggy and that is causing a log of trouble for me

Maurice Also Commented

Installing SuPHP on Debian Lenny 5.04 with Apache 2.2.9
Take care, and thanks you for the help 😉


Installing SuPHP on Debian Lenny 5.04 with Apache 2.2.9
Hi Georgie,

Thanks for the reply.

I got a little further, but still running into problems. If you like you can check the site http://magtest.system4.nl/, http://magtest.system4.nl/suphp.php or http://magtest.system4.nl/test.php. The first is a clean magento install, the second is the default suphp.php test file and the 3th is a default phpinfo().

The owner of httpdocs is magtest and the group is psaserv. All files under that directory have the same owner en group settings.

I used the following commands to get all the files of the magento install in line.

find . -type d -exec chown magtest:psaserv ‘{}’ ;
find . -type f -exec chown magtest:psaserv ‘{}’ ;
find . -type d -exec chmod 755 ‘{}’ ;
find . -type f -exec chmod 644 ‘{}’ ;

I removed point 3 from the above steps. The config file for suphp is included with the following statement in apache2.conf. The apache2/mods-enabled folder contains symbolic links to the modules in mod-available.

# Include module configuration:
Include mods-enabled/*.load
Include mods-enabled/*.conf

The apache2/mods-available/mod_suphp.load contains:
—————————————————————
LoadModule suphp_module /usr/lib/apache2/modules/mod_suphp.so

The apache2/mods-available/mod_suphp.conf contains:
—————————————————————

AddType application/x-httpd-suphp .php .php3 .php4 .php5 .phtml
suPHP_AddHandler application/x-httpd-suphp

AddType application/x-httpd-php .php

SetHandler x-httpd-php

suPHP_AddHandler x-httpd-php
suPHP_AddHandler x-httpd-php5

suPHP_Engine on

# By default, disable suPHP for debian packaged web applications as files
# are owned by root and cannot be executed by suPHP because of min_uid.

suPHP_Engine off

# # Use a specific php config file (a dir which contains a php.ini file)
# suPHP_ConfigPath /etc/php4/cgi/suphp/
# # Tells mod_suphp NOT to handle requests with the type .
# suPHP_RemoveHandler

And my suphp.conf in etc/suphp contains:
———————————————–
[global]
;Path to logfile
logfile=/var/log/suphp/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=www-data

;Path all scripts have to be in
;docroot=/var/www:${HOME}/public_html
docroot=/var/www/vhosts:${ HOME}/httpdocs

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=false
allow_file_others_writeable=false
allow_directory_group_writeable=false
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true

;Send minor error messages to browser
errors_to_browser=true

;PATH environment variable
env_path=/bin:/usr/bin

;Umask to set, specify in octal notation
umask=0033

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100

[handlers]
;Handler for php-scripts
;application/x-httpd-suphp=”php:/usr/bin/php-cgi”
application/x-httpd-php=”php:/usr/local/bin/php-cgi”
x-httpd-php=”php:/usr/local/bin/php-cgi”

;Handler for CGI-scripts
x-suphp-cgi=”execute:!self”

You know what I just realized my mistake. my php-cgi bin
is located in /usr/bin/php-cgi.

Changed that and I’ve got my first pages working. Although
I do not see the results from suphp.php script file. The wordpress
& Magento site do start up and at first glance look good.

Some things that aren’t clear to me (suphp.conf):
– umask: what is the propper value for this variable. some sites say 0022, other 0033 and others say 0077
– headers: what’s the propper text that I should place there ?

Some things that aren’t clear to me (mod_suphp.conf):
– Not sure if the addtypes are correct


Installing SuPHP on Debian Lenny 5.04 with Apache 2.2.9
I have a problem with installing suphp on a new server. I’am getting “Internal Server Error” errors.

The server is running debian 6 with plesk 10.2. We had a lot of problems with running magento on our older servers (debian 4 + plesk 8.6). after some searching and asking around we found out that we need suphp running on the computer system. Searching for installation instructions for suphp we came upon this site.

I can install suphp like mentioned above without any trouble, but when I try to run the simple php script file I get an internal server error. After checking the suphp.log file I noticed a couple of warnings about right. I fixed those.

I have no idea what I’m doing wrong. Some pointers would be very welcome.


Share this on:

Comments are closed.