-3

I have problems with the latest version of phpmyadmin. It seems that "something" is adding junk characters at the end of the php-documents. I'm 110% sure that all files is in UTF8-format (without BOM). I've never had this problem with phpmyadmin before, but i get a blank/white page after upgrading it yesterday.

Big Data
  • 114
  • 2
  • 11
Daniel
  • 1
  • 3
  • More details. What do you mean with "php-documents"? The rendered pages? The PHP source files? How did this start? Did you upgrade a version or installed from scratch? On what systems and what server type? – Sven Jul 29 '14 at 09:17
  • Sorry about that, i'm new to this site. I downloaded the latest version from phpmyadmin.net, and just installed it, (as i have done for many years). But this time, i get a blank/white page. The pagesource is there/rendered, but the browser don't show it. I've tried with both latest Google Chrome, Firefox and Internet Explorer. EDIT: I'm running apache2 on Debian 7. – Daniel Jul 29 '14 at 09:21
  • You're lacking vital information like: OS, PHP version, and if you have access to PHP server logs. – AndrewQ Jul 29 '14 at 09:28
  • Again, the OS is Debian 7. PHP version is 5.4.4. Yes, i have access to the server logs, but there isn't anything there, regarding this issue. – Daniel Jul 29 '14 at 09:31
  • This is quite impossibile: a blank page means "PHP Fatal Error" and somewhere the error is reported (/var/log/apache2/error.log, for instance) – AndrewQ Jul 29 '14 at 09:51
  • Are you sure about that? Can't it just be because of the junk characters thats being added to the end of the php sourcefiles? I just looked in the error-log again, and there isn't anything. – Daniel Jul 29 '14 at 09:53
  • If the junk chars are outside the closing tag "?>", they are outputted as is. Otherwise, they come into the PHP parsing process, generating an error. But, are you sure about junk chars? How did you see these chars? – AndrewQ Jul 29 '14 at 10:00
  • Here is the page source, http://pastebin.com/6nNH9y2J. – Daniel Jul 29 '14 at 10:01
  • I saw the characters in firefox. (see screendump, http://sv.tinypic.com/m/ie2s5w/4) – Daniel Jul 29 '14 at 10:03
  • I can't see pastebin (page not found) and tinypic (not authorised to see the page) – AndrewQ Jul 29 '14 at 10:08
  • What about now, http://imageshack.com/f/pbJfX4pSp Strange with pastebin, but here is the directlink to my phpmyadmin setup, http://storadalen.se/phpmyadmin. – Daniel Jul 29 '14 at 10:15

2 Answers2

1

Examining your homepage with Firebug, it shows a problem with css and js files. These files are not part of PHP, this explains why your logs are clean. My suggestion is: download again the zipfile of phpMyAdmin (phpMyAdmin-4.2.6-all-languages.zip), wipe out the old phpMyAdmin (keep a copy of config files), and reinstall it.
I hope this will solve the problem.

AndrewQ
  • 390
  • 3
  • 13
  • I'm really thankful for all help, but the thing is, that i've already downloaded the files 3 times. EDIT: I downloaded -and uploaded a fresh copy just now. (Same problem.) – Daniel Jul 29 '14 at 11:35
  • 1
    Are you using FTP to upload the files? If so are you using *Binary* transfer mode? – Chris S Jul 29 '14 at 13:23
  • Yes, i use WinSCP since many years. I've tried to upload in both binary-mod and "automatic". – Daniel Jul 29 '14 at 14:14
0

In FireFox, go to the menu View -> Page Style -> No Style, the page content is displayed.

Looking at the console errors, there are two - one about $ being undefined and one about PMA_CommonParams being undefined.

I'm thinking you have this kind of problem:

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.

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

with the fix:

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.

from https://stackoverflow.com/q/22453574

TessellatingHeckler
  • 5,726
  • 3
  • 26
  • 44
  • I don't have those kind of issues, but thanks anyway. – Daniel Jul 29 '14 at 12:36
  • Yes you do. Load the page in FireFox, press F12, click "Console". See the errors: `ReferenceError: $ is not defined messages.php:245` and `ReferenceError: PMA_commonParams is not defined`. The page is being hidden, JQuery is supposed to be updating the stylesheet to show it, JQuery isn't loading properly, the page remains blank. Your files are loading so it's not permissions or missing files (and you've redownloaded it). You are getting garbage characters in the content as well. It points to something broken in Apache/PHP/htaccess, or some kind of middleman proxy. – TessellatingHeckler Jul 29 '14 at 14:04
  • Any suggestions? – Daniel Jul 29 '14 at 14:29
  • OK, next guess, if I go into FireFox and `about:config` and change `network.http.accept-encoding` remove the value `gzip, deflate` and leave it blank, then reload the page, it loads. This points fingers at your gzip/deflate corrupting something, which is also plausibly an Apache or Apache module, or `.htaccess` or Apache config problem. So those are where I'd be looking. Any `.htaccess` files, `httpd.conf`, and seeing if I could remove modules, test with a default Apache config, etc. Assuming you don't have anything proxying the traffic, that is. – TessellatingHeckler Jul 29 '14 at 15:22
  • If i disable gzip/deflate, all php-codes is shown directly on my site. I really need all the help i can get with this. No i don't have any proxies. Again, this has worked before, not sure what's happend now. If i could pay, i would, (but i'm unemployed). – Daniel Jul 30 '14 at 09:06
  • Any other suggestions? Please!!? – Daniel Jul 31 '14 at 16:36