Skip to content
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

Auto-Cache Engine fails silently when allow_url_fopen=0 #644

Closed
raamdev opened this issue Dec 26, 2015 · 2 comments
Closed

Auto-Cache Engine fails silently when allow_url_fopen=0 #644

raamdev opened this issue Dec 26, 2015 · 2 comments

Comments

@raamdev
Copy link
Contributor

@raamdev raamdev commented Dec 26, 2015

When allow_url_fopen is disabled via the PHP configuration, the Auto-Cache Engine cannot read the XML Sitemap and silently fails with a PHP Warning:

[26-Dec-2015 19:15:44 UTC] PHP Warning: XMLReader::open(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/raamorg/public_html/wordpress/wp-content/plugins/zencache-pro/src/includes/classes/AutoCache.php on line 262
[26-Dec-2015 19:15:44 UTC] PHP Warning: XMLReader::open(http://raam.org/sitemap.xml): failed to open stream: no suitable wrapper could be found in /home/raamorg/public_html/wordpress/wp-content/plugins/zencache-pro/src/includes/classes/AutoCache.php on line 262
[26-Dec-2015 19:15:44 UTC] PHP Warning: XMLReader::open(): Unable to open source data in /home/raamorg/public_html/wordpress/wp-content/plugins/zencache-pro/src/includes/classes/AutoCache.php on line 262

Until we take a closer look at falling back on cURL for reading the XML Sitemap when allow_url_fopen is disabled (see #440), we should move forward with detecting when allow_url_fopen=0 and showing a Dashboard error notice to site owners when the Auto-Cache Engine is enabled.

This should work the same way as the error handling for checking the XML Sitemap itself, where the issue is checked on each admin_init and the error message cleared automatically when the error goes away. That way if a site owner sets allow_url_fopen=1 on their server and refreshes Dashboard, the error goes away automatically.


While this isn't strictly a bug, I'm marking it as a bug because for site owners on servers where allow_url_fopen=0, there is no indication of any problem. Rather, the Auto-Cache Engine simply appears to not work at all.

@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Dec 30, 2015

Next Pro Release Changelog:

  • Bug Fix: When allow_url_fopen is disabled via the PHP configuration, the Auto-Cache Engine is unable to read the XML Sitemap and was silently failing with only PHP Warning in the PHP error log. The Auto-Cache Engine currently requires PHP URL-aware fopen wrappers. A new Dashboard notice displays an error message when allow_url_fopen is disabled and prevents the Auto-Cache Engine from attempting to run. See Issue #644.
@raamdev raamdev closed this Dec 30, 2015
@raamdev raamdev removed the ready for work label Dec 31, 2015
@raamdev
Copy link
Contributor Author

@raamdev raamdev commented Jan 3, 2016

ZenCache v160103 has been released and includes changes from this GitHub Issue. See the v160103 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 (#644).

@wpsharks wpsharks locked and limited conversation to collaborators Jan 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant