can't use phpMyAdmin after creating a virtual server

Hi there

I am new to Webmin & Virtualmin, planning to migrate from the cPanel world.

I have the latest versions of Webmin & Virtualmin, installed on a CentOS 6.7 x64 VPS. After the setup is done I can log-in to phpMyAdmin with no issues, but when I add a Virtual Server and try to access phpMyAdmin I get the following output (partial) into the browser window:

addJSON( ‘options’, PMA_RecentTable::getInstance()->getHtmlSelectOption() ); exit; } if ($GLOBALS[‘PMA_Config’]->isGitRevision()) { if (isset($_REQUEST[‘git_revision’]) && $GLOBALS[‘is_ajax_request’] == true) { PMA_printGitRevision(); exit; } echo ’
‘; } // Handles some variables that may have been sent by the calling script $GLOBALS[‘db’] = ‘’; $GLOBALS[‘table’] = ‘’; $show_query = ‘1’; // Any message to display? if (! empty($message)) { echo PMA_Util::getMessage($message); unset($message); } $common_url_query = PMA_generate_common_url(’’, ‘’); // when $server > 0, a server has been chosen so we can display // all MySQL-related information if ($server > 0) { include ‘libraries/server_common.inc.php’; include ‘libraries/StorageEngine.class.php’; // Use the verbose name of the server instead of the hostname // if a value is set $server_info = ‘’; if (! empty($cfg[‘Server’][‘verbose’])) { $server_info .= htmlspecialchars($cfg[‘Server’][‘verbose’]); if ($GLOBALS[‘cfg’][‘ShowServerInfo’]) { $server_info .= ’ (’; } } if ($GLOBALS[‘cfg’][‘ShowServerInfo’] || empty($cfg[‘Server’][‘verbose’])) { $server_info .= PMA_DBI_get_host_info(); } if (! empty($cfg[‘Server’][‘verbose’]) && $GLOBALS[‘cfg’][‘ShowServerInfo’]) { $server_info .= ‘)’; } $mysql_cur_user_and_host = PMA_DBI_fetch_value(‘SELECT USER();’); // should we add the port info here? $short_server_info = (!empty($GLOBALS[‘cfg’][‘Server’][‘verbose’]) ? $GLOBALS[‘cfg’][‘Server’][‘verbose’] : $GLOBALS[‘cfg’][‘Server’][‘host’]); } echo ’
’ . “\n”; echo ’
'; if ($server > 0 || count($cfg[‘Servers’]) > 1 ) { echo ’
'; echo ’
’ . __(‘General Settings’) . ’

I am running php 5.5.28 and it is running.

If I delete the virtual server, phpMyAdmin works fine again.

Does anyone have any ideas?

Cheers, Paul

Howdy,

Hmm, is that a third party PHP version you’re using there? Also, how did you install phpMyAdmin?

I suspect those two things may be the issue…

We’d suggest using the PHP version that comes with CentOS, as other PHP versions can cause configuration problems.

Also, rather than using any kind of RPM/package for installing phpMyAdmin, we’d suggest using the Install Scripts within Virtualmin, which can install that for you into a specific domain.

-Eric

Thanks for the reply Eric.

phpMyAdmin is installed via Software Packages in Webmin, does the same if installed via command line ‘yum install phpMyAdmin’

I tried installing the phpMyAdmin 4.4.11 update from the Install Scripts page in Virtualmin and it makes no difference, still get the same error. Then upon removing the virtual server, phpMyAdmin works fine again!

Cheers, Paul

The problem is that the phpMyAdmin package that’s available as an RPM package from your distro re-configures Apache in a way that won’t work properly in a multi-user setup like the one Virtualmin uses.

So if you install that package, things wont’ work properly.

The same also goes with third party PHP versions.

You’ll need to remove that package, as well as any config files it installed under /etc/httpd, before it’ll work properly.

However, if you’re also using a third party PHP version, that can cause other sorts of problems. There’s some details regarding that here in the article “Why does PHP / ProFTPd no longer work after performing updates? (I’m using CentOS, and enabled third party repositories)”:

https://www.virtualmin.com/documentation/system/faq#Why_does_PHP_ProFTPd_no_longer_work_after_performing_updates_I-m_using_CentOS_and_enabled_third_party_repositories

I am still in the testing stages of setting up this VPS.

Shall I switch to another Linux distro, if so what one will give me the least hassle?

Cheers, Paul

There’s no need to choose another distro – all I’m suggesting is to use the version of PHP supplied with your distro, and not to install phpMyAdmin via an RPM/Deb. Install phpMyAdmin using the Virtualmin Install Script.

-Eric

Thanks Eric, will try installing phpMyAdmin via the script and see how it goes!

phpmyadmin works now but upon logging in, I am presented with a page of errors…

Your PHP MySQL library version 5.1.69 differs from your MySQL server version 5.5.44. This may cause unpredictable behavior.

Warning in ./libraries/phpseclib/Crypt/Base.php#967
openssl_encrypt(): Using an empty Initialization Vector (iv) is potentially insecure and not recommended

Backtrace

./libraries/phpseclib/Crypt/Base.php#967: openssl_encrypt(
string ‘��M�՟�B�e��’,
string ‘aes-256-ecb’,
string ‘3b4e1935a30ed231c0537d660b1cb9d0’,
boolean true,
)
./libraries/plugins/auth/AuthenticationCookie.class.php#810: phpseclib\Crypt\Base->decrypt(string ‘�� e]�ŏ�R���’)
./libraries/plugins/auth/AuthenticationCookie.class.php#458: AuthenticationCookie->cookieDecrypt(
string ‘rQ/oDRtdBpfFj+hS/wu1tw==’,
string ‘3b4e1935a30ed231c0537d660b1cb9d0’,
)
./libraries/common.inc.php#869: AuthenticationCookie->authCheck()
./index.php#12: require_once(./libraries/common.inc.php)
Warning in ./libraries/phpseclib/Crypt/Base.php#967
openssl_encrypt(): Using an empty Initialization Vector (iv) is potentially insecure and not recommended

Backtrace

./libraries/phpseclib/Crypt/Base.php#967: openssl_encrypt(
string ‘��_’ . “\0” . ‘F��͍֬?.’ . “\0” . ‘5m’,
string ‘aes-256-ecb’,
string ‘��T��ns8���X�G?��2{’ . “\0” . ‘�)ξ�0���0��<����"#^�����Wnh�-�2�nz�<��o�UV��9!x�s��@��ƫ�!x�P��K������Ų/�’ . “\0” . '{5�U�(��_k�Wqˉ8�b�׭f��4��� 4���!�a{pcn�ZI�=H����i��s}�<�a%?)�Ǝ?C�ݽ��c!�&�Q��\M0FEj��}�eR��n��� � �a�R��� ��,b_�w ��aSg|F’,
boolean true,
)
./libraries/plugins/auth/AuthenticationCookie.class.php#810: phpseclib\Crypt\Base->decrypt(string ‘�\whuT?{~�̮�{��OV��Ƽݝ/>%}’)
./libraries/plugins/auth/AuthenticationCookie.class.php#492: AuthenticationCookie->cookieDecrypt(
string ‘Fc9cdwVodVQ/e37BzK6Ie4zgTxBW1sbGvN2dLz4QJX0=’,
string ‘��T��ns8���X�G?��2{’ . “\0” . ‘�)ξ�0���0��<����"#^�����Wnh�-�2�nz�<��o�UV��9!x�s��@��ƫ�!x�P��K������Ų/�’ . “\0” . '{5�U�(��_k�Wqˉ8�b�׭f��4��� 4���!�a{pcn�ZI�=H����i��s}�<�a%?)�Ǝ?C�ݽ��c!�&�Q��\M0FEj��}�eR��n��� � �a�R��� ��,b_�w ��aSg|F’,
)
./libraries/common.inc.php#869: AuthenticationCookie->authCheck()
./index.php#12: require_once(./libraries/common.inc.php)

Warning in ./libraries/Response.class.php#370
json_encode(): Invalid UTF-8 sequence in argument

Backtrace

./libraries/Response.class.php#370: json_encode(array)
./libraries/Response.class.php#388: PMA_Response->_ajaxResponse()
PMA_Response::response()

Howdy,

I think there’s a number of third party packages that are installed on your server – those appear to be causing some problems.

The errors above are showing that MySQL is also a third party package, and you’re getting errors about the PHP libraries and MySQL libraries aren’t matching.

Would it be possible to perform a fresh install of CentOS (or whatever other distro you prefer), and try phpMyAdmin on there?

It should work out of the box, as long as there aren’t any third party packages installed.

So what you’d want to do is –

  1. Install a fresh version of CentOS

  2. Install Virtualmin

  3. Go into Virtualmin’s Install Scripts, and install phpMyadmin from there

And after doing that, it should work great for you.

-Eric

Thanks for your advice Eric.

I suspect the CentOS image provided by my (unnamed) hosting provider is at fault. Could not even run the Virtaulmin install.sh script before installing Perl. Then had to update MySQL before running the phpMyAdmin install script. What a mess!!!

I switched to the Debian distro and all worked perfect straight out of the box.

Cheers, Paul