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

Stats / Charts broken when disk_total_space and/or disk_free_space are disabled via PHP #775

Open
raamdev opened this Issue May 21, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@raamdev
Copy link
Contributor

raamdev commented May 21, 2016

When the PHP disk_total_space() and/or the disk_free_space() function has been disabled by a web host (a common security practice), Comet Cache Pro does not handle the situation gracefully and instead the entire Stats / Charts section does not load (you see an indefinite spinning animation).

2016-05-21_10-38-36

The PHP error log reports (in the case of disk_total_space() being disabled):

PHP Warning: disk_total_space() has been disabled for security reasons in /var/www/wp-content/plugins/comet-cache-pro/src/includes/traits/Shared/FsUtils.php on line 321

We need to check if disk_total_space() and disk_free_space() functions are possible before using them and hide them from the "Current Disk Health" section of the page (or hide the entire "Current Disk Health" section if neither functions are available).

We can use the functionIsPossible() method for this, here and/or here, but we'll also need to update menu-pages.js to hide things the way OPcache stats are hidden when appropriate and we'll also need to update admin-bar.js to hide things when appropriate.

2016-05-21_10-39-39

@raamdev raamdev self-assigned this Jan 10, 2017

@raamdev raamdev added this to the Next Release milestone Feb 26, 2017

raamdev added a commit to wpsharks/comet-cache-pro that referenced this issue Apr 6, 2017

raamdev added a commit to wpsharks/comet-cache-pro that referenced this issue Apr 7, 2017

Cache Stats: Hide Current Disk Health if required functions missing
 If `disk_total_space()` and `disk_free_space()` are disabled or
 otherwise not available, hide the Current Disk Health section, which
  won't work without these functions.

 wpsharks/comet-cache#775

raamdev added a commit to wpsharks/comet-cache-pro that referenced this issue Apr 20, 2017

raamdev added a commit that referenced this issue Aug 8, 2017

Phing release of v170808-RC with the following changes:
- **New Feature: Memcached / RAM** (Pro): Comet Cache Pro now includes support for Memcached / AWS ElastiCache to serve the cache directly from RAM. This allows for a faster cache delivery than what is possible when serving the cache via disk. Memcached / AWS ElastiCache can be configured from **Dashboard → Comet Cache Pro → Plugin Options → RAM / Memcached**. See [Issue #47](#47)
- **Enhancement**: Added `Referrer-Policy` to whitelist for cachable HTTP headers. See [Issue #892](#892).
- **Bug Fix** (Pro): The Cache Statistics feature was broken when the PHP `disk_total_space()` and/or `disk_free_space()` functions were disabled by the PHP configuration. Comet Cache now handles this scenario gracefully by hiding disk-related stats when those functions are not allowed. See [Issue #775](#775)
- **Bug Fix** (Pro): The HTML Compressor was returning an empty string upon encountering an invalid UTF-8 sequence. See [Issue #871](#871) reported by a Comet Cache user.
- **Compatibility** (Pro): Many improvements to the Pro software update system, including changes to the API Endpoints and the Proxy Fallback endpoint. See [Issue #879](#879) and [Issue #315](wpsharks/comet-cache-pro#315) for full details.
- **Compatibility**: Fixed a WooCommerce compatibility issue that was generating a "Notice: id was called incorrectly. Product properties should not be accessed directly." Props @vestaxpdx. See [Issue #896](#896).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment