I just downloaded the latest master branch from github and when I log in, PHP consumes 100% of one CPU on the server for about 2-3 minutes (php5-cgi process). During this time, I see the user interface like normal, but it is unresponsive. Trying to click on any links brings up the "Loading..." dialog, but they do not do anything until after the CPU usage goes down. I'm not sure if this has anything to do with running PHP through cgi, but previous versions of phpMyAdmin (e.g. 4.2.4) do not have this problem.
I forgot to mention a couple of things. This happens every time I log in, not just the first time. And once the CPU usage goes down after a few minutes, phpMyAdmin is quick and responsive until I log out and back in again.
Probably same as 4532, mb_ functions related bug.
OK, I did a bit of testing and I've narrowed it down to the
PMA_printGitRevision();
function, and even more specifically, thePMA_Config::checkGitRevision()
method. That's the culprit. CommentPMA_printGitRevision();
out in index.php and everything works fine.OK, even MORE specifically, these lines are what cause the error in
Config.class.php
lines 584-596:So it may have something to do with the bug you referenced above.
Sorry, not related to 4532, didn't check your version last time, you need to update, this is a duplicate of bug 4013, already fixed for 4.1.6.
So it's a regression then? Prehaps 4013 needs to be reopened in that case. I'm using version 4.3.0-dev.
If I change
$pmaString->substr()
to just use regularsubstr()
in the code snippet above, it goes super fast. Does it really need to be multi-byte? Bothmb_strlen()
andmb_substr()
are very slow for the data that are provided for some reason as I can see from modifyingStringMB.class.php
.Indeed, on current master it is related to mb_ functions and I was able to reproduce, but sorry, due to the wrongly reported version and PMA_printGitRevision, I mistook it to be related to be 4013.
The problem is being looked into before 4.3.0 alpha releases.
There is work in progress on this subject, can you try with https://github.com/Tithugues/phpmyadmin/tree/stringFunctions_useStandardFunctions_master ?
Works for me.
I sent a PR: https://github.com/phpmyadmin/phpmyadmin/pull/1382
Could you please test it and tell me if you still have your problem? I'm not able to reproduce it.