sasanrose / phpredmin Goto Github PK
View Code? Open in Web Editor NEWYet another web interface for Redis
License: BSD 3-Clause "New" or "Revised" License
Yet another web interface for Redis
License: BSD 3-Clause "New" or "Revised" License
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?
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 } ?>
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:
New style:
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. =)
@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.
you forget to make ability to edit values in Set !!!
like phpRedisAdmin
thanks
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
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 ,
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
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.
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
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
Hi, Please make it work with PHP7. Thank you!
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.
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?
I was able to set up a couple dummy redis test instances. If phpredmin cannot contact the server, a blank page pops up.
Hello,
I have uploading all files to my webserver but Its not working , Just showing Index of /redis : https://s17.postimg.org/kdqrns25b/Screen_Shot00215.png
Thanks
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
like in views/welcome/info.php
most standard php configs has short_open_tag = Off
Please let me know that How to install phpRedisAdmin in cPanel on CentOS 7.4?
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:
Because indexes are unique - zset always add new element and doesn't update existing.
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 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?
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?
( ! ) 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 */
),
),
),
),
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
When using fpm, this gives errors! There should be a ifmodule section before the php_value insertion ;)
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
There is no way to unset the default auth using environment variables. This should be available when the service is secured by other means like a reverse proxy.
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:
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!
hi.
Thank you for your great job.
I was installed phpredmin, but not working >.<
When i check via browser, blow error occurs.
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
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?
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:
After:
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?
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
What do you think about using GET instead of POST in search form?
In this case it will be possible to get direct links to search results.
@sasanrose, if you agree, i will implement it
I have used a lot of hours to configure nginx for running phpredmin, but it still doesn't work. :(
Could anyone share one nginx.conf sample?
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.
Hello @sasanrose,
Multi-server feature also affects how databases are selected, so this documentation is outdated:
https://github.com/sasanrose/phpredmin#database-manipulation
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.
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.
in stats hits uses info from misses stats, and misses from hits stats.
It would be nice to be able to install phpredmin via composer ..
I'm using this project in faktiva/php-admin-tk and will be nice to require this prj in composer .. nowadays I have required it manually .. see my composer.json for reference
I`am just drop the project from github using command :
git clone https://github.com/sasanrose/phpredmin.git on directory /www/var
When i try to test it and open http://localhost/phpredmin/public/
Give to me this line:
/var/www/phpredmin/libraries/drivers/log/../../../logs/apache2handler/ does not exist or is not writable/var/www/phpredmin/libraries/drivers/log/../../../logs/apache2handler/ does not exist or is not writable
environment : Ubuntu 13.04
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.