Skip to content

ahmed-hamdy90/phpredmin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHPRedMin

PHPRedMin is a simple web interface to manage and monitor your Redis.

Technologies Used

Gearman application framework

Nanophp framework

phpredis redis module for PHP

Bootstrap front-end framework

JQuery JavaScript library

Nvd3 reusable chart library for d3.JS

Installation

Just drop phpredmin in your webserver's root directory and point your browser to it (You also need phpredis installed)

Apache configuration example (/etc/httpd/conf.d/phpredmin.conf):

# phpredmin - Simple web interface to manage and monitor your Redis
# 
# Allows only localhost by default

Alias /phpredmin /var/www/phpredmin/public

<Directory /var/www/phpredmin/>
   AllowOverride All 

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip localhost
       Require local
     </RequireAny>
   </IfModule>

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

Note: If your redis server is on an IP or port other than defaults (localhost:6379), you should edit config.php file

Features

Multi-Server functionality

You can add as many redis servers as you want to your config.php file and choose between the defined servers from the menu available on the left side of all pages in PHPRedMin:

We must credit Eugene Fidelin for his great contributions to implement this feature

Statistics

Note: If you want this feature to work, you have to setup the cron to gather data from your redis server as follows:

* * * * * root cd /var/www/phpredmin/public && php index.php cron/index

Memory

CPU And Clients

Keys and Connections

Databases

Info

Information about your redis setup

Configurations

View your redis runtime configurations

Slowlog

Find slow redis commands

Note: PHPRedMin uses eval to fetch slow log. So to use this feature you need redis version >= 2.6.0

Database Manipulation

You can easily switch between databases belonging to different servers easily:

You can flush selected database or all databases. You can also save database to a file on disk:

Key-Value Manipulation

Search

The search box will let you to easily search keys in the selected database: Note: Becareful, since this still doesn't support pagination, try to limit your search otherwise if your search result is too long (e.g. *) then your browser might crash.

The search results will be shown to you as a table. In this table besides the basic information about each key, PHPRedMin provides you with some actions:

  • Expire (Sets TTL for a key)
  • View (Shows keys' value/values and lets you manipulate it/them)
  • Rename
  • Move (Moves key to another database)
  • Delete

Add key-Value

From the main page of PHPRedMin you can add different types of key-values.

Strings

Hashes

Lists

Sets

Sorted Sets

View keys' values

PHPRedMin makes it easier for you to manage your lists, hashes, sets and sorted sets. After searching for a special key, you can choose view action to see the contents of that key (According to its type) and manipulate them.

Lists

Note: This supports pagination

Hashes

Sets

Note: This supports pagination

Note: Thanks to Ahmed Hamdy you can now edit members of a set

Sorted Sets

Note: This supports pagination

Bulk Actions

Bulk Delete

This feature lets you delete a key or a bunch of keys using wild cards

Note: This feature needs gearman. You have to both install gearman and php gearman extension

Gearman Worker

You can run gearman worker using the following command:

php index.php gearman/index

You can also setup a service for this command. I prefer supervisord to make it always running. Here is my config file:

[program:phpredmin]
directory=/var/www/phpredmin/public
command=php index.php gearman/index
process_name=%(program_name)s
numprocs=1
stdout_logfile=/var/log/supervisor/phpredmin.log
autostart=true
autorestart=true
user=sasan

License

BSD License

Copyright © 2013, Sasan Rose

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the PHPRedMin nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

Yet another web interface for Redis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 89.9%
  • PHP 9.2%
  • CSS 0.9%