-
Notifications
You must be signed in to change notification settings - Fork 17
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
Apache detection not always accurate #748
Comments
Just wanted to mention that we shouldn't set those globals in the CC plugin. Those are WordPress core globals. See: https://github.com/WordPress/WordPress/blob/703d5bdc8deb17781e9c6d8f0dd7e2c6b6353885/wp-includes/vars.php#L100 I can't be sure until I look closer, but those |
@jaswsinc Thanks. I didn't realize those were set by WordPress. I've updated my original issue above to clarify the problem and I've removed the |
…sing default WP core globals for server detection, Comet Cache now uses it's own set of Apache/Nginx/IIS detection functions. And, this release enhances our Apache and Nginx detection routines; making them smart enough to catch additional edge cases; i.e., to further reduce the likelihood of there being a false-positive. See [Issue #748](wpsharks/comet-cache#748). - **Bug Fix:** Some Jetpack API calls were being cached inadvertently. See [Issue #855](wpsharks/comet-cache#855). - **Bug Fix:** Some XML-RPC and REST API requests were being cached inadvertently. See [Issue #855](wpsharks/comet-cache#855). - **Bug Fix:** Some REST requests were being redirected incorrectly whenever Apache Optimizations were enabled. See [Issue #855](wpsharks/comet-cache#855). - **Bug Fix:** Broken textarea field due to `white-space:nowrap` in Firefox. See [Issue #866](wpsharks/comet-cache#866). - **Enhancement:** Notes in HTML source now indicate fully functional on first load for improved clarity. See [Issue #860](wpsharks/comet-cache#860).
…or of `isApache()` and `isNginx()`. See: wpsharks/comet-cache#748
- **New Feature:** Comet Cache can now be configured to automatically clear the cache for date-based archive views whenever any single post is cleared due to changes in content, title, etc. See: **Dashboard → Comet Cache → Plugin Options → Automatic Cache Clearing → Auto-Clear "Date-Based Archives" Too?**. See also: [Issue #724](#724). - **New Pro Feature:** Apache Optimizations now include a new option that allows site owners to enforce an exact host name for all requests. See: **Dashboard → Comet Cache Pro → Plugin Options → Apache Optimizations → Enforce an Exact Host Name?**. See also: [Issue #101](#101). - **Bug Fix:** Apache detection sometimes inaccurate. So instead of using default WP core globals for server detection, Comet Cache now uses it's own set of Apache/Nginx/IIS detection functions. And, this release enhances our Apache and Nginx detection routines; making them smart enough to catch additional edge cases; i.e., to further reduce the likelihood of there being a false-positive. See [Issue #748](#748). - **Bug Fix:** Some XML-RPC and REST API requests were being cached inadvertently. See [Issue #855](#855). - **Bug Fix:** Broken textarea field due to `white-space:nowrap` in Firefox. See [Issue #866](#866). - **Bug Fix:** This release resolves empty directories being left in the cache folder, in some scenarios. See [Thread #866](https://forums.wpsharks.com/t/cache-folders-not-removed-during-clean-up-process/866). - **Bug Fix** (Pro): Some REST requests were being redirected incorrectly whenever Apache Optimizations were enabled. See [Issue #855](#855). - **Compatibility Bug Fix:** Some Jetpack API calls were being cached inadvertently. See [Issue #855](#855). - **Enhancement:** Notes in HTML source now indicate fully functional on first load for improved clarity. See [Issue #860](#860). - **Code Cleanup:** Enhancing security by removing `basename(__FILE__)` from direct access notices.
@raamdev @jaswsinc Possible bug regarding server detectionAPACHEWordPress Version: 4.7.2 Comet Cache Pro v170201-RC Apache Panel Seems to be missing Same site using Comet Cache Pro v161227 Apache Panel is there NGINXWordPress Version: 4.7.2 Comet Cache detects NGINX and prompts user Apache Panel is present |
@renzms Great catch. I left a Fixed in last commit. |
@raamdev @jaswsinc Fix Confirmed WorkingThis is now working correctly for Comet Cache Pro v170209-RC , the options show in the appropriate user case for the appropriate server. Apache Optimizations also working properly when enabled. |
- **New Feature:** Comet Cache can now be configured to automatically clear the cache for date-based archive views whenever any single post is cleared due to changes in content, title, etc. See: **Dashboard → Comet Cache → Plugin Options → Automatic Cache Clearing → Auto-Clear "Date-Based Archives" Too?**. See also: [Issue #724](#724). - **New Pro Feature:** Apache Optimizations now include a new option that allows site owners to enforce an exact host name for all requests. See: **Dashboard → Comet Cache Pro → Plugin Options → Apache Optimizations → Enforce an Exact Host Name?**. See also: [Issue #101](#101). - **Bug Fix:** Apache detection sometimes inaccurate. So instead of using default WP core globals for server detection, Comet Cache now uses it's own set of Apache/Nginx/IIS detection functions. And, this release enhances our Apache and Nginx detection routines; making them smart enough to catch additional edge cases; i.e., to further reduce the likelihood of there being a false-positive. See [Issue #748](#748). - **Bug Fix:** Some XML-RPC and REST API requests were being cached inadvertently. See [Issue #855](#855). - **Bug Fix:** Broken textarea field due to `white-space:nowrap` in Firefox. See [Issue #866](#866). - **Bug Fix:** This release resolves empty directories being left in the cache folder, in some scenarios. See [Thread #866](https://forums.wpsharks.com/t/cache-folders-not-removed-during-clean-up-process/866). - **Bug Fix** (Pro): Some REST requests were being redirected incorrectly whenever Apache Optimizations were enabled. See [Issue #855](#855). - **Compatibility Bug Fix:** Some Jetpack API calls were being cached inadvertently. See [Issue #855](#855). - **Enhancement:** Notes in HTML source now indicate fully functional on first load for improved clarity. See [Issue #860](#860). - **Enhancement:** Enhancing security by removing `basename(__FILE__)` from direct access notices.
Comet Cache v170220 has been released and includes changes from this GitHub Issue. See the v170220 announcement for further details. This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#748). |
As of v160417, Comet Cache is not properly setting the$is_apache
and$is_nginx
globals, which means the routines that rely on checking the values of those globals are not behaving as expected.As Jason mentions below, those globals are set by WordPress, so the fact that we have a report indicating that Apache-only routines ran when Nginx was being used indicates that there must be a failure occurring with the detection.
For example, if WordPress incorrectly reports that the web server is Apache, then Comet Cache will attempt to add or remove from the
.htaccess
file, which in certain scenarios results in site owners who are running Nginx seeing an annoying message about Comet Cache being unable to add/remove from the.htaccess
file (which isn't even applicable in their case).While we have a utility to check if the web server is Apache or Nginx, we're not actually using those utilities at the moment.
We might also be able to improve the Dashboard messages that are web-server specific. For example, we might add a link to the message that says "Not using Apache?" that dismisses the notice and sets an option key so as to prevent Apache-related errors from appearing.
Originally reported in this private ticket: https://websharks.zendesk.com/agent/tickets/12292
The text was updated successfully, but these errors were encountered: