suPHP 0.6.0 compilation et installation
La compilation de la nouvelle version de suPHP (0.6.0) semble poser quelques soucis.
Avec les sources d'origine on obtient une erreur à la compilation, pour éviter cette erreur il faut modifier le fichier source: src/apache2/Makefile.in
Info sur http://lists.marsching.biz/pipermail/suphp/2005-June/000840.html
Before doing ./configure i added "-I/usr/include/apr-0" to AM_CFLAGS
(line 96 src/apache2/Makefile.in) then i did:
./configure --with-apache-user=apache --with-apxs=/usr/sbin/apxs2
make
Après cette modif le ./configure, le make ne plante plus, par contre on obtient une erreur au début. un
apt-get install automake # tout se passe bien.
Dans la doc comprise dans le tarball, une nouvelle directive fait son apparition: suPHP_AddHandler à rajouter dans la conf apache Mais pour pouvoir être reconnu par apache, il faudra modifier le script
src/apache2/mod_suphp.c ligne 316 et 317
RSRC_CONF | ACCESS_CONF au lieu de ACCESS_CONF
Bon, on recommence:
debian:~/suphp-0.6.0# make clean
debian:~/suphp-0.6.0# ./configure --prefix=/usr \
--with-apxs=/usr/bin/apxs2 \
--with-setid-mode=paranoid \
--with-apache-user=www-data \
--with-php=/usr/bin/php4-cgi \
--with-logfile=/var/log/apache2/suphp.log
debian:~/suphp-0.6.0# make
Fin du make
make[3]: Leaving directory `/root/suphp-0.6.0/src'
make[2]: Leaving directory `/root/suphp-0.6.0/src'
make[1]: Leaving directory `/root/suphp-0.6.0/src'
make[1]: Entering directory `/root/suphp-0.6.0'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory `/root/suphp-0.6.0'
debian:~/suphp-0.6.0# make install
Making install in src
make[1]: Entering directory `/root/suphp-0.6.0/src'
Making install in apache2
make[2]: Entering directory `/root/suphp-0.6.0/src/apache2'
make[3]: Entering directory `/root/suphp-0.6.0/src/apache2'
make[3]: Nothing to be done for `install-exec-am'.
/usr/bin/install -c -d '/usr/lib/apache2/modules'
/usr/bin/install -c -m 0755 .libs/mod_suphp.so '/usr/lib/apache2/modules'/mod_suphp.so
make[3]: Leaving directory `/root/suphp-0.6.0/src/apache2'
make[2]: Leaving directory `/root/suphp-0.6.0/src/apache2'
make[2]: Entering directory `/root/suphp-0.6.0/src'
make[3]: Entering directory `/root/suphp-0.6.0/src'
/bin/sh ../config/mkinstalldirs /usr/sbin
/bin/sh ../libtool --mode=install /usr/bin/install -c suphp /usr/sbin/suphp
/usr/bin/install -c suphp /usr/sbin/suphp
make install-exec-hook
make[4]: Entering directory `/root/suphp-0.6.0/src'
chmod u+s /usr/sbin/suphp
make[4]: Leaving directory `/root/suphp-0.6.0/src'
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/root/suphp-0.6.0/src'
make[2]: Leaving directory `/root/suphp-0.6.0/src'
make[1]: Leaving directory `/root/suphp-0.6.0/src'
make[1]: Entering directory `/root/suphp-0.6.0'
make[2]: Entering directory `/root/suphp-0.6.0'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/root/suphp-0.6.0'
make[1]: Leaving directory `/root/suphp-0.6.0'
debian:~/suphp-0.6.0#
ls -la /usr/sbin/suphp
-rwsr-xr-x 1 root root 2330978 Jun 24 21:52 /usr/sbin/suphp
Warning
Désormais suPHP semble devoir fonctionner avec un fichier de conf la compil devrait le placer dans /usr/etc/suphp.conf mais il n'en est rien, il faudra le faire à la mano. Pour info un exemple est fourni avec les sources, il suffit d'en faire la copie et de l'adapter.
On essaie:
debian:~/suphp-0.6.0# /etc/init.d/apache2 start
Bug
cela ne fonctionne toujours pas ajout du suPHP_AddHandler x-httpd-php dans le fichier de conf d'apache
debian:~/suphp-0.6.0# /etc/init.d/apache2 start
Génial ça fonctionne !!! je n'y croyais plus.