looking voor howto suPHP for apache 1.3 and PHP5

snaaps

Verified User
Joined
Jan 29, 2005
Messages
227
Location
Netherlands
Hello,

I search for a howto install suPHP on a directAdmin machine with Apache 1.3.x and PHP5.

Please no links to howtos for PHP4 + PHP5 and suPHP.
Only a link howto install suphp witch apache 1.3 and PHP5
 
Code:
cd /usr/local/directadmin/customapache
wget http://de.php.net/get/php-5.2.1.tar.gz/from/this/mirror
wget http://www.suphp.org/download/suphp-0.6.2.tar.gz
tar xzf php-5.2.1.tar.gz
tar xzf suphp-0.6.2.tar.gz
cd php-5.2.1
./configure --prefix=/usr/local/php5 --enable-force-cgi-redirect --enable-fastcgi --with-config-file-path=/usr/local/etc/php5/cgi --with-curl --with-curl-dir=/usr/local/lib --with-gd --with-gd-dir=/usr/local/lib --with-gettext --with-jpeg-dir=/usr/local/lib --with-kerberos --with-mcrypt --with-mhash --with-mysql=/usr --with-pear --with-png-dir=/usr/local/lib --with-xml --with-zlib --with-zlib-dir=/usr/local/lib --with-zip --enable-bcmath --enable-calendar --enable-ftp --enable-magic-quotes --enable-sockets --enable-track-vars --enable-mbstring --enable-memory-limit
make
make install
cd ../suphp-0.6.2
./configure --prefix=/usr/local/suphp --sysconfdir=/usr/local/suphp/etc/ --with-apache-user=apache --with-setid-mode=owner --with-apxs=/usr/sbin/apxs --disable-checkpath
make
make install
mkdir -p /usr/local/etc/php5/cgi
mkdir -p /usr/local/suphp/etc
cp ../php-5.2.1/php.ini-dist /usr/local/etc/php5/cgi/php.ini
cp /etc/httpd/conf/httpd.conf httpd.conf.original
touch /var/log/suphp.log
echo "webserver_user=apache" > /usr/local/suphp/etc/suphp.conf
echo "docroot=/" >> /usr/local/suphp/etc/suphp.conf
echo "check_vhost_docroot=false" >> /usr/local/suphp/etc/suphp.conf
echo "x-httpd-php=php:/usr/local/php5/bin/php" >> /usr/local/suphp/etc/suphp.conf
Edit httpd.conf:
Code:
vi /etc/httpd/conf/httpd.conf
After the last LoadModule add:
Code:
LoadModule suphp_module /usr/lib/apache/mod_suphp.so
And after the last AddModule in the file add:
Code:
AddModule mod_suphp.c
After
Code:
AddHandler cgi-script .cgi .pl
add this:
Code:
AddHandler x-httpd-php .php .inc .php4 .php5
And at the end of file add:
Code:
<Location />
 suPHP_Engine on
 suPHP_ConfigPath /usr/local/etc/php5/cgi/
 suPHP_AddHandler x-httpd-php
 </Location>
After the changes restart apache:
Code:
/etc/init.d/httpd restart

Don't forget to remove mod_php5.so and mod_php5.c from httpd.conf too :)
 
Back
Top