Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
check your apache error log for hints (/var/log/apache/error.log) –  Nanne May 31 '13 at 11:10
    
Thanks for the reply, the error log is empty. –  SimplySimon May 31 '13 at 11:21
3  
How did you install phpMyAdmin? Using the Ubuntu packages or in some other way? I have seen issues with phpMyAdmin "from source" generating a lot of Suhosin (security hardening for Apache) errors preventing pages to be displayed. –  gertvdijk May 31 '13 at 11:23
    
I installed it with sudo apt-get install myphp5 there were a few minor password issues at the beginning but they got sorted out. –  SimplySimon May 31 '13 at 11:27
    
@Nanne sorry, looking at the wrong file. Adding Error log details to the question –  SimplySimon May 31 '13 at 11:31
show 4 more comments

2 Answers

up vote 2 down vote accepted

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

share|improve this answer
    
Thanks for that, it was the first part that fixed it. So much more usable :D –  SimplySimon Aug 1 '13 at 6:38
add comment

You could uninstall PHPMyAdmin and reinstall it. This might fix it. I would suggest deleting the phpmyadmin configuration databases in the SQL server and let it reconfigure the whole thing again. This should fix the issue.

sudo apt-get remove phpmyadmin  
sudo apt-get install phpmyadmin
share|improve this answer
    
This would have worked, but I got couldn't wait for an answer so I deleted the whole lot and started from scratch... I now have worse problems, but I think I can sort them out! –  SimplySimon Jun 11 '13 at 9:36
1  
An easier way to reinstall a package is just to use install with the --reinstall flag: sudo apt-get --reinstall install phpmyadmin If you want to delete global configuration files, use purge instead of remove, or use the --purge flag. So, to uninstall, delete global configuration files, and reinstall in one command, use: sudo apt-get --purge --reinstall install phpmyadmin –  Eliah Kagan Jul 31 '13 at 22:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.