Coder Social home page Coder Social logo

opcachegui's Introduction

OpCacheGUI

Scrutinizer Code Quality Code Coverage Build Status

GUI for PHP's OpCache. I started this project to see what you can do with PHP's OpCache. There are already a couple of projects who implement something like this, but they are either a "one file to rule them all" or just not very nice looking.

If you are looking for a simple single file status GUI please see Rasmus' one-page OpCache project.

Installation

For installation instructions and example configuration see the installation wiki page.

Contributing

How to contribute

License

MIT License (MIT)

Roadmap

v1.1.0
  • Add brazilian portuguese translations
  • Add support for the ipv6 loopback address to the firewall
v2.0.0
  • Add APCu support
  • Add Memcached support
  • Separate firewall and authentcaion layers
  • Add jailing / seperation of directories
  • Add adapter for external authentication
  • Add support to invalidate entire directories
  • Add support to warm up cache
  • Add support to manage other servers centrally
  • Delegate autoloading to Composer's PSR4 autoloader
  • Delegate routing to external library (fastroute, fasterroute, fastererroute, fastestfasterererroute)
  • Add installation page for fresh installs
  • Add update/upgrade page for existing installs
  • Add support for IPV6 addresses
  • Use proper language + region codes for translation files (http://en.wikipedia.org/wiki/IETF_language_tag) / POSIX
  • Split up individual components:
    • IP firewall
    • Human readable byte formatter
    • I18n
    • Templating system
    • CSRF token generator
    • Simple session storage

Timeline

v1.1.0
Phase Start End
Finalize roadmap 22-05-2015 23-05-2015
Create v1.1.0 branch 23-05-2015 23-05-2015
Development 23-05-2015 25-05-2015
RC1 release 25-05-2015 31-05-2015
Stable (when no blocking issues are found in RC1) 31-05-2015 31-05-2015
v2.0.0
Phase Start End
Finalize roadmap 23-05-2015 24-05-2015
Create v1.1.0 branch 24-05-2015 24-05-2015
Development 01-06-2015 31-07-2015
RC1 release 01-08-2015 15-08-2015
RC2 release 15-08-2015 31-08-2015
Update documentation 22-08-2015 31-08-2015
Stable (when no blocking issues are found in RC2) 01-09-2015 01-09-2015

Screenshots

Status page

OpCacheGUI status

Cached scripts

OpCacheGUI cached scripts

Graphs

OpCacheGUI graphs

Status page on mobile devices

OpCacheGUI status mobile

Cached scripts page on mobile devices

OpCacheGUI cached scripts mobile

opcachegui's People

Contributors

appfeel avatar bitdeli-chef avatar eeveeta avatar ekinhbayar avatar fulopattila122 avatar ikariiin avatar jason-gao avatar mr-alien avatar nessworthy avatar pborreli avatar peehaa avatar ralt avatar ronniskansing avatar salathe avatar syquel avatar taosc avatar thirsch avatar vlakarados avatar vredeling avatar wes0617 avatar xwb 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  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

opcachegui's Issues

Restrict access based on ip(range)s

Restrict access to certain ips / ipranges only.

The default will be only localhost. And an array containing ips or ipranges can be added to allow access from those locations.

Leaving it empty would allow access from any ip.

function as a drop-in, standalone tool

It would be nice if this worked as a standalone drop-in script. Previously I used to use apc.php as a drop in script and it worked great by just dropping it into my public path.

It would be a lot easier for users to adopt this without much though or configuration of .htaccess or nginx or whatever else they are using.

For myself I made a one-line change to bootstrap.php for using query strings:

$request = @$_GET['p] ?: '';

which requires modifying the URLs manually but it's easier than having to configure all of my servers.

APCu statistics

This one is on the edge of being off topic, but several developers that used APC until php 5.4 are now using a combination of OpCache + APCu for user variables.

@PeeHaa, what do you think about the idea of adding an APCu tab, displayed only if extension_loaded('apcu') is true? I could start experimenting with styles to match your GUI look & feel.

Implement (simple) authentication

I have been wanting to introduce authentication for some some time.

I was thinking about the most simplest authentication possible (like APC does it) meaning a simple user + pass combo hardcoded in the bootstrap file.

Any thoughts?

Can't login with correct credentials.

Hi,

I am using correct credentials to login to the panel but somehow it redirects me to login page again and again. I am able to access panel without credentials though.

P.S I have checked my password has via password_verify and it is returning ok.

Login with credentials error

Hi ! I just installed this pretty cool GUI.

My only problem is with the login, wich seems broken.

1/ Clearing all user/password -> site still ask for login
2/ creation a password with a php script using password_hash("mypass", PASSWORD_DEFAULT); and setting this value, the login always fail
3/ only way to access is to add my IP into the white list

Anyone succed to implement the login ? (I'm on QUERY_STRING mode)

Thx !!

OpCacheGUI/public/graphs was not found on this server.

I'm sure this is an issue of my ignorance, but I'm quite unclear as to how to implement this project within my MAMP virtual machine.

The package is installed (via git) into a directory accessible via localhost and I can see data on the main page in public/index, but getting 404's on Status, Configuration, Cached scripts and Graphs.

Future propositions and development planning!

Hey, It's some my propositions:

  • Add composer.json file
  • Create some tests by Travis and phpunit
  • Use purecss - Create simple design
  • Generate statistic by d3.js

I see that the development of the project slows down.

Rewrite rule for Apache as provided in docs not working

Hello,

I setup OpCacheGUI in a separate vhost and so I use the vhost example provided in docs.
But the RewriteRule did not worked, Apache sent me a 400 error each time I tried to access to the GUI.

So I search in the closed issues, and I found in this one that @PeeHaa gave another version of the rewrite rule. This one works perfectly.

So am I the only one who encounter issues with the RewriteRule provided in docs ?
If yes, may I suggest a PR to update the documentation ?

deactivate user authentication

I understand that user authentication is important.

However, it is rather annoying and useless, if you are running this web app via a reverse proxy already protected by Apache authentication.
There should be a way to deactivate user authentication, similar to deactivating the whitelist.

P.S.: Btw, great GUI, nice features, great app.

Timezone setting does not seem to have an effect

Hi,

on my Windows server, OpCacheGUI's default timezone (that fits to mine) is not correctly displayed in the report. Report shows UTC times. I tried to set it to Europe/Vienna or Europe/London in init.production.php, but it does not have an effect (other configuration changes in ths file have an effect!).

I was previously using opcache.php by Rasmus Lerdorf that correctly shows time values based on UTC+2.

What's wrong here?

CLI script to generate an encrypted password ?

Hi!

Would be nice to implement a CLI script on project root to generate a password via input.
Like this :

echo "Enter password to encrypt: ";
$password = trim(fgets(STDIN));

if (empty($password)) {
    echo 'ERROR: Password empty...';
    exit;
}

echo 'Encrypted password: ' . password_hash($argv[0], PASSWORD_BCRYPT, array("cost" => 12)) . "\n";

Usage : php pwd.php

Example :

Enter password to encrypt: test
Encrypted password: $2y$12$nGhWS7.zZ4Y2Zqnu4Tj7gePJOfX3R099hpXoqMPZ4XQmzRZbTsd6K

Introduce theming of the project

In this ticket there has been talk about possibly introducing theming.

What do people think about that?

Also when this need to be introduced what parts needs to be able to change? Just the stylesheet? Something else?

PHP 7 mcrypt_create_iv() is deprecated

Hi,

for PHP 7.1.3 I got the following error:
Deprecated: Function mcrypt_create_iv() is deprecated in /var/www/opcache.sergo.local/OpCacheGUI/src/OpCacheGUI/Security/Generator/Mcrypt.php

Is there anybody who has is fixed the file already? Or can I simple change mcrypt to openssl functions?

Thanks!

nginx support & rewrite off support

Hi,
I think it could be usefull to have a litle doc about nginx on install part.
But also to have a degraded mode without rewriting (index.php?/status, ...)

login from cached_scripts page

config:

$uriScheme = Router::QUERY_STRING;

if my session times out, I'll be on the url /OpCacheGUI/?cached-scripts
and presented with the login form

The form will post to
/OpCacheGUI/?cached-scripts and fails to log me in

I'm required to change the url to /OpCacheGUI/ to relogin

Affordance of red/green dots

Firstly, thanks for the nicest op cache GUI I've ever seen :).

I'm a bit confused with the usage of green and red dots. Usually green means that something is fine, great, ok while red means that there's a problem or error.

So when I saw cache full ๐Ÿ”ด I was first alarmed, also because obviously a restart was pending ๐Ÿ”ด or maybe there was a problem with a pending restart...

... until I realized that false is just red and true is green.

What about using green for on, gray for off, and red for problems?

Support ipv6 whitelisting

Having localhost automatically send to [::1] on my PC instead of 127.0.0.1, this took me quite some time to figure out the actual problem.

CSRF token failing when trying to reset cache

Hi.

I keep getting {"result":"failed"} in the result when trying to reset the cache.
When I disable the CSRF check in reset.pjson its all fine.

if (/_!$csrfToken->validate($POST['csrfToken']) ||/ !opcache_reset()) {

I dont know what the issue is but I suspect the CSRF validation to be broken.

How to install

Apologies if this should be obvious, but I have yet to get the installation quite right.

Should the entire source be installed to a directory and then the web server pointed to the root of this directory or something else?

I am trying it on Windows 2012 under Apache 2 with PHP 5.5.1

Thanks!

php7.1 Fatal error: Cannot use variable $request twice

With php7.1 I'm getting this error (that was not happening with php7.0):

Fatal error: Cannot use variable $request twice in /var/www/admin/routes.php on line 13
Call Stack
#	Time	Memory	Function	Location
1	0.0000	358528	{main}( )	.../index.php:0
2	0.0001	359072	require( '/var/www/admin/index.php' )	.../index.php:3

Invalidate entire folder

Great project, thanks for your work, much appreciated.

I was wondering if you're planning to add a feature that makes it possible to specifically and recursively invalidate an entire directory. Use case: i'd like to clear a certain virtual host only, other hosts should be kept cached (warming up every vhost puts heavy pressure on the server).

Subdirs

What if I'm using mod_php and don't want to create separate subdomain for this script? Extremely overcomplicated structure for such simple stuff... Bootstrap? Routes? I just wanna drop it to sub-subdir on my site and that's all, but it doesn't recognize routes that way... For 0.0.2 version I wrote .htaccess rewrite rules to redirect all requests from subdir/ to subdir/public/ and it was working fine. How to adapt 1.0.0-dev for random paths?

Displaying Issue If not Installed Under Root Directory

The layout works only when the tool is installed under root directory like http://a.com / however, if you want to use it under URLs like http://a.com /opcachegui or http://a.com /tools/opcachegui the layout is terrible because all JS/CSS files couldn't be found.

I was going to fix it (and send a pull request) by myself; however, I noticed that there were many files involved so it would be better to leave it to the author since the author may prefer to fix it in a way different from what I might choose.

It's really a nice tool. Thanks for your effort.

error when validate timestamps is disabled

Please consider fixing PHP notice when:
opcache.validate_timestamps=0

Notice: Undefined index: timestamp in /var/www/op/src/OpCacheGUI/OpCache/Status.php on line 195

Code on cached scripts failed after cache reset while apache benchmark processing

The messages are folowing (on /cached-scripts):

Notice: Undefined index: scripts in /home/user/proj/OpCacheGUI/src/OpCacheGUI/OpCache/Status.php on line 189

Warning: Invalid argument supplied for foreach() in /home/user/proj/OpCacheGUI/src/OpCacheGUI/OpCache/Status.php on line 189

Actually, i think that happens when opcache status are disabled and Restart pending is on.

No password_hash function to encrypt password in request

1.load configure password in index.php
2.get password in routes.php (no encrypt)
3.login function in Auth\User.php use hash_verify() to compare user raw input, but this password is not encrypt! How to use password_verify to compare different strings?

Cached scripts presentation

Currently the cached scripts page is fugly as hell. Some improvements might be:

  • Add a filter
  • Group scripts
  • Implement sorting
  • Fix design

Config of rewrite for lighttpd

Hi,

thanks for nice GUI. I would like to try it, but got problems with installing it on lighttpd, but don't know rewrite rules, I would like to run it on "mydomain.com/configuration", I tried different things, I get login screen, but can not pass it.

Thanks.

Status icons all green

Hi!

I've upgraded OpCacheGui to latest version (tried 1.0.1 and dev), and all of:

Enabled 
Cache full  
Restart pending 
Restart in progress 

Have green indicators, while only Enabled should be green, as others are fine.

File .htaccess Missing from Folder /public

File .htaccess file is missing, causing most admin page not accessable except the home page (/index.php).

The file is simple, and I believe you already have one. However, in case anyone wants to use this tool before it's updated, here is the .htaccess file I'm using:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ /index.php [L]

Notice: Undefined index: opcache.load_comments in /var/www/*/src/OpCacheGUI/OpCache/Configuration.php on line 82

The said error comes with following PHP version (as FPM):
PHP 7.0.14-1~dotdeb+8.1
Latest master is in use.

Edit: It looks like that it needs to be save_comments, not load_comments:

$ php7.0 -i|grep opcache
/etc/php/7.0/cli/conf.d/10-opcache.ini,
opcache.blacklist_filename => no value => no value
opcache.consistency_checks => 0 => 0
opcache.dups_fix => Off => Off
opcache.enable => On => On
opcache.enable_cli => On => On
opcache.enable_file_override => Off => Off
opcache.error_log => no value => no value
opcache.fast_shutdown => 0 => 0
opcache.file_cache => no value => no value
opcache.file_cache_consistency_checks => 1 => 1
opcache.file_cache_only => 0 => 0
opcache.file_update_protection => 2 => 2
opcache.force_restart_timeout => 180 => 180
opcache.huge_code_pages => Off => Off
opcache.inherited_hack => On => On
opcache.interned_strings_buffer => 4 => 4
opcache.lockfile_path => /tmp => /tmp
opcache.log_verbosity_level => 1 => 1
opcache.max_accelerated_files => 2000 => 2000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5
opcache.memory_consumption => 4096M => 4096M
opcache.optimization_level => 0x7FFFBFFF => 0x7FFFBFFF
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => 0 => 0
opcache.restrict_api => no value => no value
opcache.revalidate_freq => 2 => 2
opcache.revalidate_path => On => On
opcache.save_comments => 0 => 0
opcache.use_cwd => On => On
opcache.validate_permission => Off => Off
opcache.validate_root => Off => Off
opcache.validate_timestamps => On => On
$

Add the possibility to bypass login

I want to install this as a tool whith other in a secured path alias on my server wich handle the login for all tools like phpmyadmin, redisadmin, ....

How can we bypass the login part ?

Positive Status Feedback

Hi,

I checked out your latest RC branch and there were some minor things bugging me: A GUI shoud be designed to give either positive or negative feedback by default, but not both. In your case you set the "enabled" status to green, while "Cache full", "Restart pending" and "Restart in progress" appear red. This is quite irritating, because "red" tells me something is wrong.

Therefore you should consider:

  • renaming "Cache full" to "Cache" (if it is full display red, otherwise green or maybe also yellow)
  • combining "Restart pending" and "Restart in progress" to "Status" or "Active" (by default green, restarting / restart pending -> yellow, disabled -> red)

configuration

Thank you for this amazing tool.
I 'm sorry, I'm misunderstanding the correct way to implement it.
I'm running it on Debian 8.6 + nginx + Ispconfig
Let's say my website root is located at /var/www/websiteRoot/web
Where shall I put your script folder ? And where shall I put init.production.php ?

I 've been trying several configurations, it seems I'm missing something obvious !
I'll be really grateful if you can spend a minute of your time to comment that point.

Thanks a lot,
best regards.

Crash on opcache disabled

Hi and thanks for your project.

If I just disabled opcache:

[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=0

I have the following error when loading your project page:

Catchable fatal error: Argument 3 passed to OpCacheGUI\OpCache\Status::__construct() must be of the type array, boolean given, called in /var/www/localhost/htdocs/opcache/template/status.phtml on line 1 and defined in /var/www/localhost/htdocs/opcache/src/OpCacheGUI/OpCache/Status.php on line 58

I use the dev-master version.

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.