View Full Version : [HOWTO] SuPHP
12Media
02-01-2004, 06:22 AM
Hello,
Does any body want a howto to install suphp?
Please let me know!
FreeBSD 4.9 Howto:
Howto install suphp under FreeBSD with DirectAdmin (http://www.12media.nl/directadmin/howto/)
Greetings,
Stèphan Eizinga
nebukazar
02-01-2004, 09:21 AM
Hi,
That would be helpful for those who wants to enable suPHP :)
12Media
02-01-2004, 02:25 PM
Only i have only access to a directadmin server with many clients and the server is not mine.
If somebody have a server with not many clients and a down time from 30 min is no problem in the night (GMT+1) than i will install it on the server and make a howto from it.
aleborg
02-01-2004, 03:02 PM
I have a new server with DA and FreeBSD 4.9, I've just moved 2 customers to the new server so ypu can do it on mine :)
I'll PM you...
12Media
02-02-2004, 08:19 AM
Thanks aleborg, i have made a howto from it!
Check the first post!
Have fun!!
nebukazar
02-02-2004, 11:43 PM
EDIT 1 : Maybe the mod should move the thread to the HowTo section ?
EDIT 2 : Forgot one step. See step 8
EDIT 3 : Forgot an option on suPHP ./configure
EDIT 4 : Changed the way to install suPHP. Now everything should work perfectly!
Here are the steps I did to make suPHP work with Redhat 9.0 :
1- Get suPHP :
wget http://www.suphp.org/download/suphp-0.5.tar.gz
2- Unpack the archive and enter into the created directory :
tar -zxvf suphp-0.5.tar.gz ; cd suphp-0.5/
3- Copy your current php bin :
cp -p /usr/local/bin/php /usr/local/bin/php.CLI
- Download, extract php CGI :
Make sure you are running Redhat9.0 and you are using PHP 4.3.4 :
wget http://katou.nebukazar.net/CGI-php-v4.3.4-rh9.tar.gz
tar -zxvf CGI-php-v4.3.4-rh9.tar.gz ; cp -fp CGI-php-v4.3.4-rh9/php /usr/local/bin/php.CGI
If you are not using Redhat 9 or you're not using the same PHP version, you can download your PHP version, configure then make. The CGI php version is located under : [PHP-Directory]/sapi/cgi/php
4- Configure suPHP to your system :
./configure --with-apache-user=apache --with-php=/usr/local/bin/php.CGI --disable-checkpath --disable-checkuid --disable-checkgid --with-min-uid=0 --with-min-gid=0
5- Make :
make
6- Before doing make install, please keep a backup of your httpd.conf :
cp -p /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak
7- Make install suPHP :
make install
8- Edit your httpd.conf
- vi or pico /etc/httpd/conf/httpd.conf
locate :
<IfModule mod_php4.c>
AddType application/x-httpd-php .inc .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
</IfModule>
and replace with :
<IfModule mod_php4.c>
suPHP_Engine on
AddHandler x-httpd-php .php
AddType application/x-httpd-php .inc .php .php4 .php3 .phtml
AddType application/x-httpd-php-source .phps
9- Change 1 setting in your php.ini (!! Make sure you are editing the right php.ini file !!):
vi or pico /usr/local/lib/php.ini
find :
;cgi.force_redirect =
and change it to :
cgi.force_redirect = 0
10- Restart httpd :
service httpd restart
suPHP log is installed under /etc/httpd/logs/suphp_log
If you need more help PM me or contact me at ltellier@3logics.com
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.