1

I'm having problems accessing my phpmyadmin.

I have all of my manage servers running on XAMPP and when i go to localhost/phpmyadmin I'm given the same error as this title.

I've seen there is loads of permissions you can change on the files in xampp. However the question is what is the right one to change and what is the command?

Ta

    function checkPermissions()
{
    // Check for permissions (on platforms that support it):
    if ($this->get('CheckConfigurationPermissions')) {
        $perms = @fileperms($this->getSource());
        if (!($perms === false) && ($perms & 2)) {
            // This check is normally done after loading configuration
            $this->checkWebServerOs();
            if ($this->get('PMA_IS_WINDOWS') == 0) {
                $this->source_mtime = 0;
                PMA_fatalError(
                    __(
                        'Wrong permissions on configuration file, '
                        . 'should not be world writable!'
                    )
                );
            }
        }
    }
}
Isaac Bennetch
  • 11,830
  • 2
  • 32
  • 43
Max Lynn
  • 1,738
  • 6
  • 22
  • 35
  • Than chk the credentials either fine or not – devpro Feb 05 '16 at 09:16
  • Check the credentials where? – Max Lynn Feb 05 '16 at 09:17
  • 1
    Possible duplicate of [PhpMyAdmin "Wrong permissions on configuration file, should not be world writable!"](http://stackoverflow.com/questions/7577490/phpmyadmin-wrong-permissions-on-configuration-file-should-not-be-world-writabl) – Chetan Ameta Feb 05 '16 at 09:20
  • Yeah I've already looked at that one but none of the solutions suggested have worked – Max Lynn Feb 05 '16 at 09:20
  • Goto phpmyadmin/libraries/Config.class.php and comment this line $this->checkPermissions(); – devpro Feb 05 '16 at 09:22
  • http://www.davinder.in/blog/wrong-permissions-configuration-file-should-not-be-world-writable – devpro Feb 05 '16 at 09:23
  • Thanks Devpro but I only have the function in that file not where its being called. I'll add the function to my question – Max Lynn Feb 05 '16 at 09:36

2 Answers2

1

Programatically omitting this security check is bad practice.

I see you've been going through security settings in phpMyAdmin, but this error is about the config file access rights/ file permissions on the file system!

You just don't have file access rights setup correctly. 'world writable' means that every user on the system (read: anyone in the world that acquires access -if system is on internet), can alter the configuration file and thus access your applications, data etc.

So, as a standard security measure, phpMyAdmin has this "file access rights" check built in, to check if the file is 'world writeable' or not. It found out it is "open for everyone". Omitting this check could mean everyone can access it and your data, applications, possibly system will be at risk of being hacked.

You should make sure access rights to the config file are correct. On linux systems this is done by using the chmod command as outlined in the suggested post by Chetan. File location and permissions are in some extent depending on your hosting provider.

If you cannot change the file access rights yourself consult your hosting provider.

Best of luck!

Werner
  • 449
  • 4
  • 12
0

Devpro you deserve the credit here as you led me to the solution however I found that the checkPermissions was being called in the common.inc.php file in the libraries folder. I then uncommented it and it was a solution to be happy about.

xamppfiles/phpmyadmin/common.inc.php

Cheers guys.

Max Lynn
  • 1,738
  • 6
  • 22
  • 35