I have a Debian Lenny web server. It is running apache2 with libapache2-mod-suphp. Unfortunately, suphp makes impossible to use phpmyadmin, as phpmyadmin is installed in /usr/share/phpmyadmin and owned by root, and suphp disables it's engine in this direcory:
$ cat /etc/apache2/mods-enabled/suphp.conf
<IfModule mod_suphp.c>
AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml
suPHP_AddHandler application/x-httpd-php
<Directory />
suPHP_Engine on
</Directory>
# 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.
<Directory /usr/share>
suPHP_Engine off
</Directory>
</IfModule>
Is there a possibility to enable system phpmyadmin (may be through standard libapache2-mod-php5) while using suphp? How?
In /etc/apache2/mods-available/suphp.conf following two lines:
should be changed to:
Then, in /etc/suphp/suphp.conf line
should be changed to:
Then, contents of /etc/apache2/mods-available/php5.conf should be changed from:
to:
This way, all php scripts get assigned x-httpd-suphp type which is handled by suphp. As suphp is disabled for files in /usr/share, in php5.conf for this directory php scripts get type of x-httpd-php and are handled by mod_php5. This way, you retain suphp for all other scripts except for system-installed ones in /usr/share.
The configuration files have changed since the time of the original answer.
These files no longer need to be changed:
This file:
only needs the
<Directory /usr/share>
wrapper around the current file.e.g.:
== Current copies of the Files for ==
root@local [~]# cat /etc/apache2/mods-available/suphp.conf
root@local [~]# cat /etc/suphp/suphp.conf
root@local [~]# cat /etc/apache2/mods-available/php5.conf
fwiw on ubuntu 12.04 i took the following steps: added
to the end of docroot in /etc/suphp/suphp.conf
added
to /etc/apache2/mods-enabled/suphp.conf
created a new virtual host
did
which gets it mostly working.
I've not been able to figure out how to get rid of the error message asking for a blowfish_secret. Ubuntu scatters the config files through several directories and their /etc/phpmyadmin/apache.conf has
i'm not willing to add all those paths to the suphp docroot, and pma does not recognise /usr/share/phpmyadmin/config.inc.php