suPHP + phpmyadmin = 500
phpmyadmin was working, i have since installed suPHP and now phpmyadmin does not work.
i get a 500 error and an index.php file downloads.
i am not sure where to go from here.
suPHP by default does not allow folders outside of the docroot and the owner of the phpmyadmin files is root
i have tried disabled that check for docroot, which i really do not think is safe and i tried changing the owner of the phpmyadmin files to www-data just for the heck of it an it doesn't work.
so i think i need to have phpmyadmin installed in the docroot?
7 Replies
if i dont enable going outside of the docroot, which is default, i get this
[Sun Sep 19 18:42:17 2010] [warn] File "/usr/share/phpmyadmin/index.php" is not in document root of Vhost "/home/brian/public_html"
if i enable going outside of the docroot, i get this
[Sun Sep 19 18:50:19 2010] [warn] Script "/usr/share/phpmyadmin/index.php" resolving to "/usr/share/phpmyadmin/index.php" not within configured docroot
by docroot they mean my public_html directory
this error happens for each account on the server, so it's as if it would have to be installed on each docroot which is just silly
only way was to go by ip address.
my second ip address is not assigned to a site so i can go to that and it just goes the main website dir
/var/www
i copied phpmyadmin to /var/www/phpmyadmin
then it worked…
making a symlink even would not work, i had to copy the whole dir
also i needed to
chown -R www-data:www-data /var/www/phpmyadmin
so now i go to
12.34.56.78/phpmyadmin
and it works, and i guess that anyone on the server who wants to use phpmyadmin will have to go there as well
EDIT:
then to make this pretty much transparent to current users,
i added a line to their virtual host file
Redirect /phpmyadmin
i only added this to accounts who actually use phpmyadmin, this seems like an added security benefit so that people wont just get to the phpmyadmin login page and start guessing away for most of the sites on my server.
[Sun Sep 19 18:50:19 2010] [warn] Script "/var/www/phpmyadmin/index.php" resolving to "/usr/share/phpmyadmin/index.php" not within configured docroot
meaning anyone who wanted to access it would have to go to phpmyadmin.mysite.com
by the way i am using virtualmin, not that it really matters.
it's fixed now so i am happy