Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't select a DB #52

Closed
godoffrags opened this issue Mar 28, 2014 · 8 comments
Closed

Can't select a DB #52

godoffrags opened this issue Mar 28, 2014 · 8 comments

Comments

@godoffrags
Copy link

Hi,

i like PHPRedmin.
Installation was no problem.
But my redis Server contains 3 DBs.
For default PHPRedmin select DB 0. That is OK.
I see the other DBs on the left side with the count of entrys.
But if i click on one they select already the DB 0.
I don't know what i do wrong. The URL show correct "...welcome/index/0/1" or "...welcome/index/0/2"

Could somebody help me or fix this?

@sasanrose
Copy link
Owner

@topdatagmbh, I didn't get your problem. I would be grateful if you could explain more.

@godoffrags
Copy link
Author

There are no log entrys in php log or your logs.
I test it in the newest firefox and newest chrome. In both i have the problem.
PHPRedmin runs on a amazon instance.
I wrote you to your gmail email a access for the redmin.

@sasanrose
Copy link
Owner

I tried and checked your instance of phpredmin and I confirm there was a problem with database selection. However, I am not able to debug it. Since, I don't have any access to the files and my own local instance works fine. We need more information for debugging this problem.

@toubsen
Copy link
Contributor

toubsen commented Apr 14, 2014

I can confirm that behaviour on my own instance. The culprit are the following lines in "libraries/controller.php", which will not work against Redis 2.4.x

    $databasesConfig = $this->_objects['db']->config('GET', 'databases');
    $current['max_databases'] = $databasesConfig['databases'];

Thus the max_databases will be set to zero against Redis 2.4, which in turn will always discard the passed "dbId" URL param.

This could be circumvented by using the INFO command againts redis, and then parsing the maximum dbId prefix from the output, but would then only catch the databases that have keys defined.

Best workaround to support such old versions is probably to allow to configure the maximum database number in config.php

@toubsen
Copy link
Contributor

toubsen commented Apr 14, 2014

I made small changes to my local instance to allow manual configuration of the max database count. Sent you a pull request for this, which unfortunately ended up in a new issue, as I missed how to let it appear here (sorry fo the duplicate).

@blitzmann
Copy link
Contributor

I just got new hosting with 2.4, and I can also confirm this bug. @toubsen's fix seems to work

@godoffrags
Copy link
Author

Fix work :) Thanks

@blitzmann
Copy link
Contributor

A fix for this has been merged, go ahead and close the issue if you don't mind. =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants