Please note the new address for this forum : forum.excito.org. The old address redirects here but I don't know for how long. Thanks !
New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Install suphp

Got problems with your B2 or B3? Share and get helped!
Post Reply
bubbadog
Posts: 4
Joined: 21 Dec 2009, 08:56

Install suphp

Post by bubbadog »

Can anyone tell me the correct procedure for installing suphp onto Bubba Two please?
bubbadog
Posts: 4
Joined: 21 Dec 2009, 08:56

Re: Install suphp

Post by bubbadog »

Ok, so far I have:

installed gcc
installed make
a2dismod php5
/etc/init.d/apache2 restart
apt-get install apache2-prefork-dev
wget http://www.suphp.org/download/suphp-0.6.2.tar.gz
tar xvfz suphp-0.6.2.tar.gz
cd suphp-0.6.2
vi src/apache2/mod_suphp.c

edited lines 324 and 325 in mod_suphp.c to read:

AP_INIT_ITERATE("suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, RSRC_CONF | ACCESS_CONF, "Tells mod_suphp to handle these MIME-types"),

AP_INIT_ITERATE("suPHP_RemoveHandler", suphp_handle_cmd_remove_handler, NULL, RSRC_CONF | ACCESS_CONF, "Tells mod_suphp not to handle these MIME-types"),

./configure --prefix=/usr --sysconfdir=/etc --with-apache-user=www-data --with-setid-mode=paranoid --with-apxs=/usr/bin/apxs2
make
make install

p /tmp/suphp-0.6.2/doc/suphp.conf-example /etc/suphp.conf

vi /etc/suphp.conf

to give:

[global]

;Path to logfile
logfile=/var/log/suphp.log
;Loglevel
loglevel=info
;User Apache is running as
webserver_user=www-data
;Path all scripts have to be in
docroot=/
;Path to chroot() to before executing script
;chroot=/mychroot
; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
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=false
;PATH environment variable
env_path=/bin:/usr/bin
;Umask to set, specify in octal notation
umask=0077
; Minimum UID
min_uid=100
; Minimum GID
min_gid=100
[handlers]
;Handler for php-scripts
x-httpd-php=php:/usr/bin/php5-cgi
;Handler for CGI-scripts
x-suphp-cgi=execute:!self

I restart apache2 but the file type .php is still not handled correctly.

What am I doing wrong please?
carl
Posts: 474
Joined: 07 May 2008, 04:41

Re: Install suphp

Post by carl »

Have you tried using the package libapache2-mod-suphp?
/Carl Fürstenberg, Excito Software Developer
http://www.excito.com
support@excito.com
bubbadog
Posts: 4
Joined: 21 Dec 2009, 08:56

Re: Install suphp

Post by bubbadog »

carl wrote:Have you tried using the package libapache2-mod-suphp?
Hi Carl,

Many thanks for your reply.
I have just installed the package libapache2-mod-suphp you mentioned, and, although it appeared to install OK, php files are still not being handled correctly (browser tries to download them).

Any more help would be much appreciated please.
bubbadog
Posts: 4
Joined: 21 Dec 2009, 08:56

Re: Install suphp

Post by bubbadog »

Hi Carl,

Well after a lot of experimentation I created a USB stick with a partition table and the factory restore image and restored my Bubba 2 (not a bad thing in itself).

I found that after installing libapache2-mode-suphp I got a '500 internal server error' when I tried to run php scripts within my web/joomla/ directory. But removing the libapache2-mode-suphp module had scripts running ok.

What have I done wrong please?
Post Reply