Ubuntu – PhpMyAdmin “More Settings” Option Generates Blank Page

13.04PHPphpmyadmin

phpMyAdmin works well except for a couple of links on the Home Page.

There are two links to More Settings, however they both take me to a blank page.

Am I missing a module, or does it need reinstalling?

The apache error.log reports:

[Fri May 31 09:22:06 2013] [notice] caught SIGTERM, shutting down
[Fri May 31 09:23:04 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.9-4ubuntu2 configured -- resuming normal operations
[Fri May 31 11:14:32 2013] [notice] caught SIGTERM, shutting down
[Fri May 31 11:15:52 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.9-4ubuntu2 configured -- resuming normal operations

Thanks

Best Answer

  • Ok, this is a bug which has fix but not available in raring, at least not yet. Why on earth is phpmyadmin using eval?

    This bug was fixed in the package phpmyadmin - 4:4.0.1-2

    --------------- phpmyadmin (4:4.0.1-2) unstable; urgency=low

    • Add /usr/share/javascript to open_basedir config (closes: #708611).
    • Wrap check_file_access() function in config.inc.php in a function_exists block, because this file sometimes gets included twice (LP: #1175142).

    The Fixes

    1. Function already defined fix

    Open problematic config file: sudo vi /etc/phpmyadmin/config.inc.php and change the following:

    function check_file_access($path)
    {
        if (is_readable($path)) {
            return true;
        } else {
            error_log(
                'phpmyadmin: Failed to load ' . $path
                . ' Check group www-data has read access and open_basedir restrictions.'
            );
            return false;
        }
    }
    

    to

    if (!function_exists('check_file_access')) {
        function check_file_access($path)
        {
            if (is_readable($path)) {
                return true;
            } else {
                error_log(
                    'phpmyadmin: Failed to load ' . $path
                    . ' Check group www-data has read access and open_basedir restrictions.'
                );
                return false;
            }
        }
    }
    

    Note: All you're doing here is adding the function exists check if (!function_exists('check_file_access')) { }.

    Saucy proposed source with the fix

    2. If that doesn't solve the problem, you may also need to add /usr/share/javascript to open_basedir config

    Open the apache config file: sudo vi /etc/phpmyadmin/apache.conf and change:

    php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/
    

    to

    php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/
    

    Saucy proposed source with the fix

  • Related Question