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

Fatal error: Uncaught exception 'Exception' with message 'Invalid XML sitemap status code #512

Closed
KTS915 opened this issue Jun 28, 2015 · 11 comments

Comments

@KTS915
Copy link

KTS915 commented Jun 28, 2015

Just attempted to update a localhost installation running the last ZenCache Pro RC to the latest public version of ZenCache Pro. I just get a white screen. I have tried renaming plugin folders without success.

I also tried downloading the latest version ZenCache Pro and installing that manually, as if by FTP, but withour making any apparent difference.

I read the debug log and found that it was expecting the RC folder, so I copied that back in. I also renamed, then deleted the regular ZenCache Pro folder. Got different messages in the debug log, but still a white screen.

With the zencache-pro-v150605.rc_ folder in place, and no ZenCache Pro folder, this is what the latest attempt to get the site working produces in the debug log:

[28-Jun-2015 15:09:55 UTC] PHP Warning: include(/var/www/html/webby/wp-content/advanced-cache.php): failed to open stream: No such file or directory in /var/www/html/webby/wp-settings.php on line 65
[28-Jun-2015 15:09:55 UTC] PHP Warning: include(): Failed opening '/var/www/html/webby/wp-content/advanced-cache.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/webby/wp-settings.php on line 65
[28-Jun-2015 15:09:55 UTC] PHP Warning: include(/var/www/html/webby/wp-content/advanced-cache.php): failed to open stream: No such file or directory in /var/www/html/webby/wp-settings.php on line 65
[28-Jun-2015 15:09:55 UTC] PHP Warning: include(): Failed opening '/var/www/html/webby/wp-content/advanced-cache.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/webby/wp-settings.php on line 65
[28-Jun-2015 15:09:56 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'Invalid XML sitemap status code at: http://192.168.2.14/webby/sitemap.xml. Expecting a 200 status. Instead got: 404.' in /var/www/html/webby/wp-content/plugins/zencache-pro-v150605.rc_/src/includes/classes/AutoCache.php:251
Stack trace:
#0 /var/www/html/webby/wp-content/plugins/zencache-pro-v150605.rc_/src/includes/classes/AutoCache.php(84): WebSharks\ZenCache\Pro\AutoCache->getSitemapUrlsDeep('http://192.168....')
#1 /var/www/html/webby/wp-content/plugins/zencache-pro-v150605.rc_/src/includes/classes/AutoCache.php(21): WebSharks\ZenCache\Pro\AutoCache->run()
#2 /var/www/html/webby/wp-content/plugins/zencache-pro-v150605.rc_/src/includes/closures/Plugin/AutoCacheUtils.php(24): WebSharks\ZenCache\Pro\AutoCache->construct()
#3 [internal function]: WebSharks\ZenCache\Pro\Plugin->WebSharks\ZenCache\Pro{closure}()
#4 /var/www/html/webby/wp-content/plugins/zencache-pro-v150605.rc
/src/includes/classes/AbsBaseAp.php(55): call_user_func_array(Object(Closure), Arra in /var/www/html/webby/wp-content/plugins/zencache-pro-v150605.rc
/src/includes/classes/AutoCache.php on line 251

@KTS915
Copy link
Author

KTS915 commented Jun 28, 2015

Hmm, wouldn't you know it?! I grappled with this for ages before reporting it, and even re-started Apache a couple of times, but now it's just come back (at least on admin pages). So I deleted ZenCache Pro RC, uploaded the latest version, and now it's all working again, including on the front end.

Very weird - but at least it's working now!

@KTS915 KTS915 closed this as completed Jun 28, 2015
@raamdev
Copy link
Contributor

raamdev commented Jun 29, 2015

@KTS915 What you experienced is a known issue; please see 511

We're still investigating this and what would be immensely helpful to our investigation is if you could send us a copy of the output of phpinfo() on the site where you saw this issue occur. (You can use the WordPress phpinfo() plugin if you'd like.)

@KTS915
Copy link
Author

KTS915 commented Jun 29, 2015

OK, Raam, here's the output generated by that plugin:

http://pastebin.com/KSG9jbBa

@KTS915 KTS915 reopened this Jun 29, 2015
@raamdev
Copy link
Contributor

raamdev commented Jun 29, 2015

@KTS915 Thanks for the info.

Upon further inspection it looks like this is unrelated to Issue #511. (I see that the error message you got was different than the one described in 511):

[28-Jun-2015 15:09:56 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'Invalid XML sitemap status code at: http://192.168.2.14/webby/sitemap.xml. Expecting a 200 status. Instead got: 404.' in /var/www/html/webby/wp-content/plugins/zencache-pro-v150605.rc_/src/includes/classes/AutoCache.php:251

However, that does seem like a bug that we need to fix--i.e., it seems like that's an error that ZenCache should be handling properly but is currently not handling properly.

I'm going to leave this GitHub Issue open so that we can look at this more closely. Thanks for the report! :-)

@raamdev raamdev changed the title White screen after update from RC to latest version Fatal error: Uncaught exception 'Exception' with message 'Invalid XML sitemap status code Jun 29, 2015
@jaswrks
Copy link

jaswrks commented Aug 21, 2015

@KTS915 writes...

[28-Jun-2015 15:09:55 UTC] PHP Warning: include(): Failed opening '/var/www/html/webby/wp-content/advanced-cache.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/webby/wp-settings.php on line 65

This indicates the advanced-cache.php file was missing, which is rather unexpected if ZenCache is installed. However, I have seen this occur for site owners that use deployment scripts or host with a service like the AWS Elastic Beanstalk. If your own set of deployment files is missing the advanced-cache.php file (since it is auto-generated), a new deployment can cause this issue momentarily. ZenCache picks up on this almost immediately though, and will regenerate the advanced-cache.php file automatically. Can you confirm that this is not the primary issue that you're having?

@KTS915 also writes...

[28-Jun-2015 15:09:56 UTC] PHP Fatal error: Uncaught exception 'Exception' with message 'Invalid XML sitemap status code at: http://192.168.2.14/webby/sitemap.xml. Expecting a 200 status. Instead got: 404.' in /var/www/html/webby/wp-content/plugins/zencache-pro-v150605.rc_/src/includes/classes/AutoCache.php:251

This PHP exception is thrown on purpose, as an advisory. If ZenCache attempts to access a sitemap URL that is non-existent (where the ACE = Auto-Cache Engine) is running behind-the-scenes, an easy way for us to notify a developer about this is to throw an exception in PHP so it is logged for debugging purposes.

The reason for that missing sitemap? If you're running the Google XML Sitemaps plugin, I have seen a few instances where this plugin is unable to determine the current host, particularly in a multisite network. Have you been able to confirm that the XML sitemap does in fact exist there? i.e., http://192.168.2.14/webby/sitemap.xml

If not, I'd suggest taking a closer look at your sitemap generating plugin to see where ZenCache might be getting this URL from. If you are running a multisite network, please let me know. I might be able to offer some insight.

@KTS915
Copy link
Author

KTS915 commented Aug 21, 2015

@jaswsinc,

Thanks for all these comments. But I think you give me too much credit! I wouldn't know how to run a deployment script, and I haven't heard of AWS Elastic Beanstalk.

The installation in question is actually a (presumably rather humdrum) single site installation on my localhost, running the Linux Mint 17.1 OS. I don't run a Google XML Sitemaps plugin, or anything like that.

The latest version of ZenCache Pro fixed the problem.

I'm not sure what I should expect to see if I go to http://192.168.2.14/webby/sitemap.xml. I get a 404 message, but the appearance of the page is at it should be, so I assume that things are working as intended.

Thanks again!

@jaswrks
Copy link

jaswrks commented Aug 21, 2015

I'm not sure what I should expect to see if I go to http://192.168.2.14/webby/sitemap.xml. I get a 404 message, but the appearance of the page is at it should be, so I assume that things are working as intended.

I see! Thanks :-) That explains the scenario more clearly for me.

So you were not running a plugin that generates a sitemap at all in this case. WordPress doesn't generate an XML sitemap automatically, so without a sitemap plugin this URL should in fact return a 404 error; i.e., that would be expected.

http://192.168.2.14/webby/sitemap.xml = 404 (expected in a default install)

It sounds like you enabled the ACE in ZenCache, and perhaps entered your own list of URLs instead of relying on the sitemap alone. Do I have that right?

If you leave the ACE configured with /sitemap.xml as a config. option (that's a default value), then it will still look for that sitemap location too, in addition to any other URLs that you enter manually.

↑ That could trigger the 404 error, and I can see where that would lead to this confusion. cc @raamdev

@jaswrks
Copy link

jaswrks commented Aug 21, 2015

2015-08-21_06-57-58

@KTS915
Copy link
Author

KTS915 commented Aug 21, 2015

@jaswsinc,

No, I didn't enter any URLs of my own. I just have ZenCache Pro set to "Yes, I want the auto-caching engine to keep pages cached automatically"

@jaswrks
Copy link

jaswrks commented Aug 21, 2015

The latest version of ZenCache Pro fixed the problem.

Good enough :-) Glad to hear it.

I confirmed that the ACE is off by default here, so I'm not understanding how it would run without it being enabled at some point, but I'll keep my eyes open for that. Thanks again for the report! :-)

@raamdev
Copy link
Contributor

raamdev commented Aug 21, 2015

@KTS915 Thanks for the feedback. :-)

@jaswsinc I've opened a separate GitHub issue to track improvements to the Auto-Cache Engine UI; thanks for pointing that out! :-) See #555

@raamdev raamdev closed this as completed Aug 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants