Need help?

Our experts have had an average response time of 11.7 minutes in August 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

DirectAdmin PhpMyAdmin error 500 – How to fix it

by | Apr 29, 2021

While accessing PhpMyAdmin from DirectAdmin panel, users often receive a 500 error.

As a part of our Server Management Services, our Support Engineers helps to fix similar DirectAdmin-related errors regularly.

Let us today discuss the possible reasons and fixes for this error.

What causes DirectAdmin PhpMyAdmin error 500

PhpMyAdmin at times returns the error as given below while accessing it from DirectAdmin. A typical error message looks like the one below:

DirectAdmin PhpMyAdmin error 500

Though it shows the error while accessing PhpMyadmin, MySQL would be running fine on the server. Also, users would be able to create and delete databases via DirectAdmin control panel.

Some of the top reasons for this error include:

  1. ini_set function is present in the disabled functions.
  2. Mod_security rule is triggered.
  3. Request exceeded the limit of 10 internal redirects due to probable configuration error.
  4. Check for any conflicting PHP extensions

 

How to fix DirectAdmin PhpMyAdmin error 500

Before we get into the steps to fix the PhpMyAdmin error, it is important to collect the details of the errors in the logs. Our Support Engineers cross-check the apache error log initially for errors. This can be in /var/log/httpd/error_log or /var/log/httpd/domains/domain.com.error.log.

Next, they turn on “display_errors” in config.php file under phpmyadmin folder.

1. Remove ini_set function from disable_functions in php.ini

By default, each server has a set of functions declared in the disabled functions list in php.ini. This feature is to disable the execution of dangerous functions in the server.

For instance, Our Engineers have noticed a few of these cases where the ini_set function is disabled in the php.ini file and it triggers the error with PHPMyAdmin. Removing it from the disable_function list fixes the issue.

2. Modsecurity Rules

Another common reason for this error would be ModSecurity rule. By default custombuild installation, mod_security rules are installed in /etc/modsecurity.d/

Apache load’s ModSecurity modules and configuration in/etc/httpd/conf/extra/httpd-modsecurity.conf.

In reality, the easiest way to disable Modsecurity is to disable apache to load ModSecurity module in https-modsecurity.conf file. Just add #comment’s to begin LoadModule directive:

httpd-modsecurity.conf
LoadFile /usr/local/lib/libxml2.so
#LoadModule security2_module /usr/lib/apache/mod_security2.so
<ifmodule mod_security2.c>
# Default recommended configuration
SecRuleEngine On
SecRequestBodyAccess On
.
.
.
</ifmodule>

Another method if we want to keep ModSecurity module loaded to apache is change SecRuleEngine to Off as given below

SecRuleEngine Off

Then restart the web service.

3. Update and rebuild DirectAdmin

Sometimes, updating and rebuilding DirectAdmin fixes this error with the PHPMyAdmin. This can be done with the series commands below:

cd /usr/local/directadmin/custombuild
./build update
./build set use_hostname_for_alias no
./build rewrite_confs

 

4. Disable conflicting PHP extensions.

Often, the PHPMyAdmin error could also be related to some PHP extensions. For instance, we recently handled a support request where the uploadprogress extension was triggering the error.

To disable a php extension in DirectAdmin follow the series of steps below:

  • Log in to your server via SSH.
  • Change directory to custombuild and run an update.
    cd /usr/local/directadmin/custombuild
    ./build update 
    ./build set_php extension_name no

We can verify the extensions either by using command “php -m” from command line or by using php.info page.

[Need any further assistance in fixing DirectAdmin errors? – We’re available 24*7]

Conclusion

In short, the PhpMyAdmin error 500 triggers due to a number of reasons that include PHP settings, modsecurity rules etc. Today, we saw how our Support Engineers fix them.

 

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF