Centos – Internal Server Error phpMyAdmin with suPHP

500-errorapache-2.2centoscentos6.2

I recently installed phpMyAdmin on our dedicated server. It was working fine until we had disk space full and had to move /home to new partition. Now we are getting following error while visiting xxxx.xx.xxxx.xxxx/phpMyAdmin/ or domain.com/phpMyAdmin/ we get Internal Server error.

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@domain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/2.2.15 (CentOS) Server at domain.com Port 80

I looked into the error log file and I could find only one error related to phpMyAdmin

[Fri Nov 16 01:11:06 2012] [info] Executing "/home/flourish/public_html/index.php" as UID 2010, GID 2010
[Fri Nov 16 01:11:15 2012] [warn] File "/usr/share/phpMyAdmin/index.php" is not in document root of Vhost "/home/flourish/public_html"
[Fri Nov 16 01:11:16 2012] [warn] File "/usr/share/phpMyAdmin/index.php" is not in document root of Vhost "/home/flourish/public_html"

Is this related to permission issue or vhost? It was working fine before we had issue with disk space.

Thanks

Best Answer

suPHP won't allow phpMyAdmin to run because it is in /usr/share/phpMyAdmin/ rather than the root of Vhost "/home/flourish/public_html".

The easiest way to fix this is by changing the check_vhost_docroot=true flag to false in the suphp.conf.

If that is too insecure for your blood, you can make phpMyAdmin it's own VHOST.