1

For some reason, today I am unable to log into PHPMyAdmin (v4.0.3). In fact, there is no login form at all, just the PHPMyAdmin logo at the top.

On first load of the page, I get the warning: "Cookies must be enabled past this point."

In the browser console, I get: Error: ReferenceError: $ is not defined ReferenceError: PMA_commonParams is not defined Error: TypeError: document.getElementById(...) is null

I've also seen the warning "Javascript must be enabled past this point."

Searching Google, there are quite a few people that have had this problem. Here's everything I've tried to rectify the problem in config.inc.php:

  • Installed the latest version of PHPMyAdmin (v4.1.9) but the log in screen was entirely blank!
  • Changed auth_type to http. This allows me to log in, but I get a 404 when trying to delete a table row
  • Made sure the server date/time is correct
  • blowfish_secret is set
  • Cleared all cookies
  • Changed host from 'localhost' to '127.0.0.1'
  • Disabled IPv6

Here is my config as it stands. It was working fine, but not anymore. The only thing that has changed on the server is the application of security certificates.

/* Servers configuration */ $i = 0; /* Server: localhost [1] */ $i++; $cfg['Servers'][$i]['verbose'] = 'localhost'; $cfg['Servers'][$i]['host'] = 'localhost'; $cfg['Servers'][$i]['port'] = ''; $cfg['Servers'][$i]['socket'] = ''; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['AllowNoPassword'] = true; /* End of servers configuration */ $cfg['DefaultLang'] = 'en-utf-8'; $cfg['ServerDefault'] = 1; $cfg['UploadDir'] = ''; $cfg['SaveDir'] = ''; 

6 Answers 6

3

In my case server disk was full. It can be also a reason.

Sign up to request clarification or add additional context in comments.

Comments

2

I've found the problem. I have WordPress running on the server. An app called 'Better WP Security' makes a number of changes to htaccess. The offending line is this:

RewriteCond %{QUERY_STRING} ^.*(\[|\]|\(|\)|<|>|ê|"|;|\?|\*|=$).* [NC,OR] 

This prevents the use of arrays (square brackets) in the querystring. This method is used by PHPMyAdmin to load the javascripts. As JS was breaking, the login form wasn't shown.

I've removed the line for now. I'll head over the the Better WP Security forum to see if I can make an exclusion for PHPMyAdmin in the regular expression.

Comments

1

Same issue: stylesheets and scripts don't load.

ReferenceError: $ is not defined ReferenceError: PMA_commonParams is not defined 

Responsable .htaccess rule in my case:

AddCharset utf-8 .atom .css .js .json .rss .vtt .xml 

Comments

0

I had the same problem but it was down to cookies being blocked for localhost.

I got this problem with phpMyAdmin v4.2.10.1 - that is there is nothing except the logo and the PMA_commonParams javascript error. In an earlier v3.5.4 I got the 'cookies must be enabled' message too.

There's a similar Server Fault question and I've edited one of the answers with detailed steps to unblock FF cookies.

Comments

0

In my case the js_defer file was being blocked my the Apache Pagespeed plugin. Disabling the plugin fixed this issue for me.

Comments

0

Same Problem In My Case. After Reading all the Answers, I Just Cleared My Cookie. And It Works Fine. Now the Login Form Works Perfectly. Try This Also.

Thank You.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.