phpMyAdmin drop with "Internal Server Error"

thunn

Verified User
Joined
Mar 13, 2012
Messages
167
Dear Supporter,
I have the same issue as this thread, but still not resolve my problem with their replies.

I upgrade from phpmyadmin 3.3.10 to phpmyadmin 3.5.2.2 but it get error:
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

I have checked with:
1. chown -R webapps:webapps /var/www/html/phpmyadmin
=> No result, still the same issue.

2. Read the error log:
[Thu Sep 06 06:47:37 2012] [crit] [client xxx.xxx.xxx] (13)Permission denied: /var/www/html/phpMyAdmin/setup/.htaccess pcfg_openfile: htaccess file, ensure it is readable
=> this file does not exist in /var/www/html/phpMyAdmin/setup/.htaccess

3. I have tried to rollback to phpmyadmin 3.3.10 version but it does not work, still same issue.

Can I have some advise?

Thanks.
 
Code:
cd /usr/local/directadmin/custombuild
./build update
./build clean
./build phpmyadmin d
 
yes, I perform update, clean and having no problem.
When I build phpmyadmin:


Code:
[[email protected] custombuild]# ./build phpmyadmin d
mail-header-patch=yes is set in the options.conf, but is not required with this php version.

To enable the X-Mail header, set mail.add_x_header to 1 in your php.ini
phpMyAdmin 3.5.2.2-all-languages installation is done.

When I tried again with phpmyadmin in browser, it still the same :(
 
Permissions?

Code:
chmod 755 /var/
chmod 550 /var/www/
chown webapps:apache /var/www/
chmod 755 /var/www/html/
chown webapps:webapps /var/www/html/
 
Yes. Previous time it show:
[Thu Sep 06 06:47:37 2012] [crit] [client xxx.xxx.xxx] (13)Permission denied: /var/www/html/phpMyAdmin/setup/.htaccess pcfg_openfile: htaccess file, ensure it is readable

But current time I check and got this (after visit http://domain.com/phpmyadmin):
/var/log/httpd/error_log
Code:
[Fri Sep 07 12:32:22 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/favicon.ico
[Fri Sep 07 12:32:22 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/404.shtml
[Fri Sep 07 12:32:29 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/favicon.ico
[Fri Sep 07 12:32:29 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/404.shtml
[Fri Sep 07 12:32:30 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/favicon.ico
[Fri Sep 07 12:32:30 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/html/404.shtml


/var/log/httpd/domains/domain.com.error.log
Code:
[Fri Sep 07 13:10:42 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/xxx/private_html
[Fri Sep 07 13:10:42 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/xxx/private_html
 
Last edited:
Its definitely a permission issue. You need to check all the folders in /var/www/html/phpmyadmin

You probably could fix it like this:

Code:
find /var/www/html/phpMyAdmin* -type d -exec chmod 755 {} \;
find /var/www/html/phpMyAdmin* -type f -exec chmod 644 {} \;
chown -R webapps:webapps /var/www/html/phpMyAdmin*
 
Last edited:
I have tried but still having same problem :(

[root@domain html]# find /var/www/html/phpMyAdmin* -type d -exec chmod 755 {} \;
[root@domain html]# find /var/www/html/phpMyAdmin* -type f -exec chmod 644 {} \;
[root@domain html]# chown -R webapps:webapps /var/www/html/phpMyAdmin*
[root@domain html]#
 
My guess that the problem exists higher above /var/www/html/phpMyAdmin* then.

Permisisons on /var/www or /var/www/html are not right.

Code:
chmod 755 /var/www
chmod 755 /var/www/html
chown -R webapps:webapps /var/www/html
 
If phpmyadmin is installed by custombuid, then the setup directory if chmod'ed to 000 if I'm not mistaken. So the error

[Thu Sep 06 06:47:37 2012] [crit] [client xxx.xxx.xxx] (13)Permission denied: /var/www/html/phpMyAdmin/setup/.htaccess pcfg_openfile: htaccess file, ensure it is readable

should be ignored.

Did you check /var/log/suphp.log ?
 
OK, my server provider recognized that disable_functions include ini_set will cause the error.
How can I increase security by disable ini_set but still using phpmyadmin as normal?
 
Some days ago I fixed the same issue on my server.

You need edit php.ini and remove ini_set in the line starts with "disable_functions".
PHP.INI locate at:
Code:
/usr/local/lib/php.ini

Save it and run command:
Code:
service httpd reload

any more info on how to do this?
 
I suggest to still keep ini_set in disable_functions.
This php.ini file can be locate at /usr/local/lib/php.ini, or /usr/local/etc/php5/cgi/php.ini

And follow this instruction if you want to have any special setting for phpmyadmin (as I did):
http://help.directadmin.com/item.php?id=183

Some not very useful function like php_uname in phpmyadmin you can remove directly from code.
 
Back
Top