GithubHelp home page GithubHelp logo

sasanrose / phpredmin Goto Github PK

View Code? Open in Web Editor NEW
404.0 404.0 96.0 1.67 MB

Yet another web interface for Redis

License: BSD 3-Clause "New" or "Revised" License

PHP 12.08% ApacheConf 0.01% CSS 1.41% JavaScript 86.47% Shell 0.04%

phpredmin's People

Contributors

ahmed-hamdy90 avatar blackikeeagle avatar blitzmann avatar dralbert avatar eugef avatar gsouf avatar hemeragp avatar luongvm avatar lzref avatar marios-zindilis avatar markus-perl avatar mnvx avatar nervo avatar nilportugues avatar peter-trerotola avatar sasanrose avatar stuntguy3000 avatar tortuetorche avatar toubsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpredmin's Issues

Pagination

I know there is a notice that PHPRedmin doesn't support pagination yet. As far as I'm aware, it's been there since I started using it (way back when those little pills were still used for navigation).

Just curious where development is on this, if it has even started yet? What might be involved with implementing it?

Using socket: no documentation and cannot make it work.

Hello,

First, thanks for this nice GUI for Redis.

We are trying to make it work with redis on unix socket. We have many containers and using TCP is not a solution as docker is limited to around 30 networks and we don't want others containers being able to connect to redmin (if we make 1 network per stack to secure redis, we would be limited to maximum 30 indepedant stacks). So we set it as socket and share the socket folder between redis container and phpredmin container.

In my docker-compose I have:

        environment:
            - "PHPREDMIN_DATABASE_REDIS_0_HOST=unix:///var/run/redis/redis.sock"

But it don't work, i got a blanck page... no errors displayed and nothing in /var/log.

First, where can we find the errors log or force display them ?
Second what is the good synthax to make it work with socket, I tried:

  • unix:///var/run/redis/redis.sock
  • unix:/var/run/redis/redis.sock
  • unix://var/run/redis/redis.sock
  • ///var/run/redis/redis.sock
  • /var/run/redis/redis.sock
    But none works... : (

I should add using TCP, the exact same docker compose work.
Socket is working, i tested it with redis-cli.
So the problem seems to make phpredmin use the socket file... I any help could be given it would be nice, and may e add it to the documentation.

Thanks!

Should only enable flag when php is loaded

When using fpm, this gives errors! There should be a ifmodule section before the php_value insertion ;)

Enable the short tags for PHP scripts

php_value short_open_tag 1

Hi,Thanks for your job!! I have a bug to report...

index 1e85d4a..5f99b70 100644
--- a/views/welcome/info.php
+++ b/views/welcome/info.php
@@ -66,7 +66,7 @@
info['connected_slaves']?>

  •    <? } ?>
    
  •    <?php } ?>
     <tr>
         <td>
             Used Memory:
    

it show a 500 error....

so I change to ,

cannot deploy to subdomain

when using xx.com/phpredsmin/oublic/index.php everything work ok
but gitve it a subdomain like phpredismin.xx.com return 500 error with no error log
apache documentroot set to /path/to/phpredismin/public

I can not start.

hi.
Thank you for your great job.

I was installed phpredmin, but not working >.<
When i check via browser, blow error occurs.


/usr/local/httpd/public_html/public/libraries/drivers/log/../../../logs/apache2handler/ does not exist or is not writable/usr/local/httpd/public_html/public/libraries/drivers/log/../../../logs/apache2handler/ does not exist or is not writable

Environment
Apache version : Apache/2.2.15 (Unix)
PHP version : 5.3.3
Redis version : 2.2.4 (Php module)
Document root : /usr/local/httpd/public_html/public/


Do you have a any idea? about my miss?

Best regards
Thank you

Can't select a DB

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?

where is the Admin Page

how can I access the redmin admin page? it displays blank page. im a newbie looking forward to help me thank you
aaaaa

Index into Lists

when you view index of Lists begin from 1 not from 0
in views/lists/view.php
can you change

    <?php foreach ($this->values as $member => $value) { ?>
        <tr>
            <td>
                <?=$member+1 ?>
            </td>
            <td>
                <?=$value?>
            </td>
        </tr>
    <?php } ?>  

into

    <?php foreach ($this->values as $member => $value) { ?>
        <tr>
            <td>
                <?=$member?>
            </td>
            <td>
                <?=$value?>
            </td>
        </tr>
    <?php } ?>

Statistics can't have the same value with different timestamps.

Hi @sasanrose.

When statistics is gathering it is not possible to have the same value but with different timestamps.

Let say at 10:00 you measured amounts of clients and got 3.
Then at 11:00 you measured clients and got 3 again.
When you insert last value "3" - it will just update existing value with last timestamp, and you won't have two values.

Expected to have in zset:

Value: 3 Score: 10:00
Value: 3 Score: 11:00

Actual value of zset:

Value: 3 Score: 11:00

This is a feature of Redis zset described here: http://redis.io/commands/zadd
(in our case value is "member" and timestamp is "score"):

If a specified member is already a member of the sorted set, the score is updated and the element reinserted at the right position to ensure the correct ordering.

To be able have a history of how value is changing i do the following:

  • save value in a separate list (ex: phpredmin:stats:clients:values)
  • index of this value and its time save to zset (ex: phpredmin:stats:clients:times)

Because indexes are unique - zset always add new element and doesn't update existing.

Unable to connect to server with authentication

If you add server and set password for it, then you will end up with and exception. You can see it in the logs as:

[error]: Failed to AUTH connection on /opt/phpredmin/libraries/drivers/db/redis.php:7

The problem seems to come from following code:

    $this->connect($config['host'], $config['port']);
    $this->select($config['database']);

    if (isset($config['password'])) {
        $this->auth($config['password']);
    }

The reason is that select db command issued before authentication and failed. To fix it I changed it to the following code:

    $this->connect($config['host'], $config['port']);

    if (isset($config['password'])) {
        $this->auth($config['password']);
    }

    $this->select($config['database']);

PS I'm using Redis 2.8.4. I think this solution should work for older versions either, but haven't checked.

Automatic hashing password

There should be password in plain text in docker-compose.yml
Using hash is inconvenient.

environment:
            - PHPREDMIN_AUTH_USERNAME=UserName
            - PHPREDMIN_AUTH_PASSWORD=PlainPassword

You can hash it and save somewhere on first run index.php

$hash = GetHash();
if(!$hash){
$pwd = getenv('PHPREDMIN_AUTH_PASSWORD');
$hash = password_hash($pwd, PASSWORD_DEFAULT);
SaveHash($hash);
}
// login method

Broken DB navigation

I have three databases: 0, 1, and 3 (don't ask where 2 went... it's too painful to talk about it)

Commit 2dfb838 broke this. I cannot find the DB naviagtion. Before this commit:

before

After:

after

Multiple Redis servers

It could be great if phpredmin could support multiple Redis servers in the configuration file.
By default it could display the first server in the list and to have drop-down list close to the Actions ones to select the server latter on.

The cron should perform it's actions on all defined servers.

Styleing changes

I have to say, I'm not a big fan of how some of the UI is styled. For example, the DBs are in the same list as the server (you would think they would be in a separate list, or perhaps a sub list). And the active DB is the same style as the active server. It gets the idea across, especially since there is more important work to be done, but it's poor UI design.

I made a mockup, wondering if you're interested in making it permanent. Old style:
oldstyle
New style:
stylechanges

As you can see, the databases are now differentiated from the server list, and they also 'connect' to the content that manipulates the database. I also pulled the tabs that add data to the right to separate them from the tabs that search/delete

Again, it's a quick mockup that isn't ready to be pulled, more work has to be done and I need to set up a few more redis servers to see how multiple servers work with it. Just wondering if there was any interest on pulling these style changes to the main branch. =)

404 if key have some special characters

If redis data's key have special characters (like search-results:31c7d1e4839d8efe837cfe746bae110a/accuracy,DESC/10::48) then you can't rename, move or view data. Created url is like /index.php/keys/rename/search-results%3A31c7d1e4839d8efe837cfe746bae110a%2Faccuracy%2CDESC%2F10%3A%3A48 and I've got 404 every time

Cannot change default password

I installed phpredmin by adding your instruction to my docker-compose.yml file. However -PHPREDMIN_AUTH_PASSWORD = mypassword does not set the password. Is there something I can do about this?

Blank Configurations page

When I click Configurations in the navigation bar, I get this:

screen shot 2014-06-30 at 2 08 12 pm

Looking in logs/fpm-fcgi/2014-06-30.log turned up this:

[2014-06-30 14:06:40] [184.186.16.104]  [warning]: Invalid argument supplied for foreach() on /srv/www/phpredmin/views/welcome/config.php:4

Weird URLs

Hi, I have just installed phpredis. The index page works for me, but when I click on links, I'm redirected to wrong sites with no graphics in it (css is not being applied, because the URLs to the CSS files look like this one: http://phpredmin.loc/index.php/welcome/config/0/bootstrap/css/bootstrap.min.css).

The site urls look like this:
http://phpredmin.loc/index.php/welcome/index/0/0
http://phpredmin.loc/index.php/welcome/info/0/0
http://phpredmin.loc/index.php/welcome/config/0/0

I don't know what I could have done wrong, I'm sending my virtual host config, just to be sure:

<VirtualHost *:80>
    ServerName          phpredmin.loc
    ServerAlias         phpredmin

    DocumentRoot "/Users/rasta/DEV/phpredmin/public"
    DirectoryIndex index.php

    <Directory "/Users/rasta/DEV/phpredmin/public">
        Require all granted
        Options Indexes
    </Directory>

    ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/Users/rasta/DEV/phpredmin/public/$1

    ErrorLog "/usr/local/var/log/apache2/phpredmin.loc-error_log"
    CustomLog "/usr/local/var/log/apache2/phpredmin.loc-access_log" common
</VirtualHost>

I was also checking the layou.php file and I've seen lines like this in there:

<?= $this->router->baseUrl?>/bootstrap/css/bootstrap.min.css ?>

But I don't really have time to find out, why $this->router->baseUrl outputs the whole site URL

Getting Error while running in apache

D:\redisdb\libraries\drivers\db\redis.php:3

I am getting above error while i running on public direcotry? if there any redis class file missing into your code?

Failed inclusions when run via cmdline

php /full/path/to/index.php cron/index fails as the app relies on being executed in the "public dir"

Even if not strictly necessary (a cd could solve) I suggest to use only fully qualified paths in the scripts in order to have a more portable behavior ..

just define a BASE_DIR (using __DIR__) constant and refer to it every time including or requiring files

my 2 cents

Nginx conf for phpredmin

Hi, thank You for admin panel! Could you post the configs for Nginx, router.php is not simple to fix the rewrite location rules. URLs look like /index.php/welcome/index/0/0 and so by default script_name is /index.php/welcome/index/0/0. What is the reason to use such complicated URIs?

Use relative paths for resources

Hi,
I am currently setting up phpredmin and running into an issue because the website tries to load stylesheets etc. through http.

My setup is a Nginx server proxying into a VM on the same machine also running Nginx which has phpredmin installed. The issue is that the resource tags in the html are written like this: http://example.com/font-awesome/css/font-awesome.min.css even though I am access through https.

Other applications like phpmyadmin also running on the same machine work without problems, because they don't use full urls (why would they?).

Is there any reason why full urls are used instead of relative paths and or it isn't recognizing that I coming through https?

The host Nginx server is setup to forward the protocol infos to the Nginx server in the VM.

Warning in the log

The extra parameter in the method PhpTemplate::getHeaders() is not needed and should be removed.

[2013-02-28 21:01:01] [127.0.0.1] [Router] [info]: /phpredmin/public/index.php/welcome/index/
[2013-02-28 21:01:01] [127.0.0.1]  [warning]: Missing argument 1 for PhpTemplate::getHeaders(), called in /home/adrian/projects/git/phpredmin/views/layout.php on line 14 and defined on /home/adrian/projects/git/phpredmin/libraries/drivers/template/php.php:48

Remove useless columns from search results

@sasanrose , i propose to remove columns "idle time" and "ref count" from search results as they are useless.

According to http://redis.io/commands/OBJECT

OBJECT IDLETIME returns the number of seconds since the object stored at the specified key is idle (not requested by read or write operations).

In our case idle time will always be 0, because those key was just returned (read) by KEYS command.

OBJECT REFCOUNT returns the number of references of the value associated with the specified key. This command is mainly useful for debugging.

When accessing the object, the refcount is increased so that you cannot try to delete an object that is being accessed. By default, the refcount is 1 because one key refers to one value. It will quickly jump up to 2 and back down to 1 again during a GET, whilst the object is read. This means that if you issue a DEL on the object during the GET, you bring the refcount down to 1 instead of 0. Then, when the GET completes, the refcount decrements again and hits 0, and is successfully deleted.

The OBJECT REFCOUNT command is simply there to debug reference counting, to make sure refcounts are incremented and decremented properly across all paths of execution.

Again, ref count will be equal to 1 for all the keys in search result set.

As for me these two columns could be removed as they are useless. This also will save us 2 request to Redis per key.

If you agree with proposed changes i will implement them.

Key with slash

Key with slash can't be edited (actions expire, rename, view, move, delete)
Generated link like http://localhost/phpredmin/public/index.php/keys/view/test%2Ftest responds with 404 Not Found.

Request confirm for synchronous save

As it is mentioned in Redis documentation http://redis.io/commands/save

You almost never want to call SAVE in production environments where it will block all the other clients. Instead usually BGSAVE is used

I think we should ask user confirmation before executing synchronous save and suggest to use asynchronous save instead

Feature: named databases

Would be nice if we could name the databases from the config file. I'll take a whack at this today if I have time.

redmin stats empty for memory/cp, client, and AOF

Hello! I've set up cron according to instructions. I've ran it manually and no errors were produced.

redmin stats page has No Data for Memory/CPU, Client, and AOF.
But the keys tab shows data.

I'm using the latest Redis 3.0. 'redis-cli info' does show data for keys and clients, etc. Not sure if I'm missing something else?

500 internal error server php_value short_open_tag 1

Hi,

I got the message error 500 when I tried phpredmin with Apache : http:X.X.X.X/phpredmin

I installed Apache/2.4.23 and PHP 7.

The message error is :
/var/www/html/phpredmin/public/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration

Here is the content of my .htaccess:
php_value short_open_tag 1

My phpredmin.conf file is :
Alias /phpredmin /var/www/html/phpredmin/public
<Directory /var/www/html/phpredmin/>
AllowOverride All

# Apache 2.4

Require ip 127.0.0.1
Require local

<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1

Anyone have idea about this problem ? Thanks

Integrate into Laravel

What do you think if I can integrate phpredmin into my Laravel 4/5 cms administration ? If yes, do you have some hints for doing that? As I see phpredmin is a little mvc framework, could it work as a single "library"?
thanks

Get the following error when browsing the UI

	( ! ) Notice: Undefined index: dbs in /var/www/vhosts/redis_gui/views/layout.php on line 129
	Call Stack
	#	Time	Memory	Function	Location
	1	0.0000	360888	{main}( )	.../index.php:0
	2	0.1430	370560	router->route( )	.../index.php:51
	3	0.1439	403152	Welcome_Controller->indexAction( )	.../router.php:117
	4	0.1440	405064	PhpTemplate->render( )	.../welcome.php:7
	5	0.1442	419824	PhpTemplate->renderPartial( )	.../php.php:23
	6	0.1446	438960	include( '/var/www/vhosts/redis_gui/views/layout.php' )	.../php.php:32**
	**

Config:

	'database'  => array(
			'driver' => 'redis',
			'mysql'  => array(
				'host'     => 'xxxxxxxxx:2999',
				'username' => 'user',
				'password' => 'Password!'
			),
			'redis' => array(
				array(
					'host'     => '172.123.4.233',
					'port'     => '6379',
					'password' => null,
					'database' => 0,
					'max_databases' => 16, /* Manual configuration of max databases for Redis < 2.6 */
					'stats'    => array(
						'enable'   => 1,
						'database' => 0,
					),
					'dbNames' => array(
						'redis' => 'Redis DB'
					/* Name databases. key should be database id and value is the name */
					),
				),
			),
		),

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.