Unable to use phpmyadmin to search "users" table.

jols

Well-Known Member
Mar 13, 2004
1,110
3
168
Not quite sure what to make of this. We've got a customer on one an older server who is unable to use the cPanel installed, phpmyadmin utility to search their "users" table. Keeps returning:

" MySQL returned an empty result set (i.e. zero rows). ( Query took 0.0075 sec )"

But this same customer also has another account on a newer cPanel server where there is no such issue, i.e. the searches work just fine.

Any advice?
 

jols

Well-Known Member
Mar 13, 2004
1,110
3
168
No, regretfully no. I've searched all over too.

At first I thought it was a permissions issue, but there is an issue with trying this from both using phpMyAdmin within cPanel (by the individual hosted account member) and WHM (by the server admin), so I really don't think this is permissions related, but rather possibly some kind of compatibility issue between phpMyAdmin and a recent update of the cPanel system.
 

janipewter

Active Member
Jan 2, 2013
44
3
8
cPanel Access Level
Root Administrator
I have this same problem. What version of PHP do you use?

Mine only started after I downgraded from PHP 5.3 to PHP 5.2 due to compatibility issues with my site on my new server. I have read around the internet and a lot of sites seem to suggest it is related to a variable (max_input_vars) which was implemented in PHP 5.3.

I have not managed to solve it yet, and it's rather annoying. It also affects the users table in my database. I have over 150,000 users and I cannot search the database. If I query it, it works fine. But the search in phpmyadmin does not.
 

jols

Well-Known Member
Mar 13, 2004
1,110
3
168
On the particular server where this problem exists, we are still at 5.2.x. Another server with 5.3.x does not have this issue.
 

cfrench

Registered
Jan 2, 2013
3
0
1
cPanel Access Level
Root Administrator
I'm getting the same exact issue. It only happens on some tables, not all. When I search using the SQL command it works fine. Definitely a bug and an annoying one at that.
 

Gleem

Registered
Aug 31, 2002
3
0
151
Ok, I have only tested this on one table, but the problem appears to be on tables with ENUM fields. After I changed ENUM to SET on one of the tables having problems I was able to get results returned from my search.
 

cfrench

Registered
Jan 2, 2013
3
0
1
cPanel Access Level
Root Administrator
Ok, I have only tested this on one table, but the problem appears to be on tables with ENUM fields. After I changed ENUM to SET on one of the tables having problems I was able to get results returned from my search.
It happens for me on INT but only on some tables. It's very strange.
 

slawn

Member
Dec 30, 2012
8
0
1
cPanel Access Level
Root Administrator
Same problem here for the last 3 weeks or so - since the last update. Problem was occurring on all of my servers (5 of them) with different PHP, MySQL ver.

I've searched on the web and the problem definitely exists because I've found it on few forums - but no solution given so far and cPanel staff doesn't seem to pick this up or do anything about it.

Just spent some time investigating and won't be getting into to many details - the problem is connected to tables that have ENUM fields and it's connected to the javascript that is used to build AJAX request. Basically if you have an ENUM field and you won't select it, it is being passed as NULL so simple query which should look like that:

SELECT * FROM test WHERE userid = 1

looks like that (firebug will help you see the response from AJAX request)

SELECT * FROM test WHERE userid = 1 AND enum_field = 'null'

Now how to fix that. Edit this file:

/usr/local/cpanel/base/3rdparty/phpMyAdmin/js/tbl_select.js

and replace this:

if(a["fields["+d+"]"]=="")

with this:

if(a["fields["+d+"]"]=="" || a["fields["+d+"]"]==undefined)

Hope that helps (very annoying bug)!!!
 

WhiteDog

Well-Known Member
Feb 19, 2008
138
3
68
Has this issue been reported to / fixed by phpMyAdmin itself ?
Looks like something they'd want to fix (and not us or cPanel :))
 

slawn

Member
Dec 30, 2012
8
0
1
cPanel Access Level
Root Administrator
Has this issue been reported to / fixed by phpMyAdmin itself ?
Looks like something they'd want to fix (and not us or cPanel :))
The problem is that phpmyadmin on cPanel is not the latest one. There are no issues with the new one (I use it locally) - the latest ver is 3.5.5 and the one on cPanel is 3.5.3.
 

jols

Well-Known Member
Mar 13, 2004
1,110
3
168
Thanks slawn.

I can also confirm that the edit/fix you recommend has resolved the issue here as well. Thanks once again.