Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: suPHP + phpmyadmin = 500
PostPosted: Sun Sep 19, 2010 6:40 pm 
Offline
Junior Member

Joined: Tue Aug 31, 2010 12:14 am
Posts: 27
i am running ubuntu
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?


Top
   
 Post subject:
PostPosted: Sun Sep 19, 2010 6:43 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
What does your apache error log say?


Top
   
 Post subject:
PostPosted: Sun Sep 19, 2010 7:31 pm 
Offline
Junior Member

Joined: Tue Aug 31, 2010 12:14 am
Posts: 27
this is from the suphp.log

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


Top
   
 Post subject:
PostPosted: Sun Sep 19, 2010 8:03 pm 
Offline
Junior Member

Joined: Tue Aug 31, 2010 12:14 am
Posts: 27
so i got it working...
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 http://12.34.56.78/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.


Top
   
 Post subject:
PostPosted: Sun Sep 19, 2010 9:01 pm 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
symlinks won't work if you don't have FollowSymLinks


Top
   
 Post subject:
PostPosted: Sun Sep 19, 2010 9:08 pm 
Offline
Junior Member

Joined: Tue Aug 31, 2010 12:14 am
Posts: 27
the symlink itself worked, i would just get an error such as:

[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


Top
   
 Post subject:
PostPosted: Mon Sep 20, 2010 10:06 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Why don't you just give phpmyadmin it's own virtual host configuration with the docroot set to where it's installed. Then phpmyadmin will be in the doc root and your problems will go away.


Top
   
 Post subject:
PostPosted: Mon Sep 20, 2010 4:57 pm 
Offline
Junior Member

Joined: Tue Aug 31, 2010 12:14 am
Posts: 27
i could, but phpmyadmin would only work for that one docroot, in the puiblic_html of that virtualhost.

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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group