Googlebot抓取错误500和PHP错误报告(带有奇怪的解决方案) [英] Googlebot Crawl Error 500 and PHP Error reporting (with a strange solution)

查看:156
本文介绍了Googlebot抓取错误500和PHP错误报告(带有奇怪的解决方案)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以Google不会在我的实时网站上的任何地方爬行,而不是简单的第一页 - 而只是给我500个错误。在网站管理员工具中以Google身份获取表明,它将返回带有HTTP / 1.0 500内部服务器错误标题的完整html输出。我在本地工作的xampp中打开了display_errors,但是看不到任何问题,所以我检查了live server上的error_log,也没有。最终我决定打开服务器上的display_errors - 我没有访问php.ini,所以我刚刚在htaccess文件中添加了php_flag display_errors。当我这样做Google不再返回500网络服务器错误,现在将索引页面!最奇怪的是没有新的PHP错误被显示!我只是没有得到它。

So Google wouldn't crawl anywhere on my live site other than some simple first pages - instead just giving me 500 errors. Fetching as Google in the Webmaster tools showed that it would return the full html output with the header "HTTP/1.0 500 Internal Server Error". I work locally in xampp with display_errors turned on but couldn't see any problems there so I checked the error_log on the live server - nothing there either. Eventually I decided to switch on display_errors on the server - I don't have php.ini access so I just added "php_flag display_errors on" to the htaccess file. When I did this Google no longer returned a 500 internet server error and will now index the page! The weirdest thing is no new PHP errors are being displayed! I just don't get it.

所以基本上:
PHP输出导致Googlebot的500错误,直到我把php_flag display_errors onin .htaccess,即使没有显示错误。

So basically: PHP output causes 500 error for Googlebot until I put "php_flag display_errors on" in .htaccess even though no errors are displayed.

任何帮助?我显然宁愿把display_errors从长远的关掉,但是我需要摆脱这500个错误。我只是不知道如何找出导致他们的原因。

Any help? I obviously would rather have display_errors turned off in the long run but I need to get rid of these 500 errors. I just don't know how to find out what is causing them.

推荐答案

你的eval'd代码通过@符号),它有一个解析错误。由于PHP(Bug#45592)的错误,这将导致一个PHP 500.可以修复解析错误或摆脱Eval的某种方式(您很少需要一个eval)。

Your eval'd code (which is being silenced by a @ sign), has a parse error in it. Because of a bug with PHP (bug #45592), this will result in a PHP 500. Either fix the parse error or get rid of the Eval's somehow (you should rarely need an eval).

这篇关于Googlebot抓取错误500和PHP错误报告(带有奇怪的解决方案)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆