My application is throwing a Zend_Locale_Exception when called from googlebot where ZF sends the following error message:
Autodetection of Locale has been failed!
The problem is probably because the default locale isn't set, but how can I debug this?
Since google bot isn't real time I need to actually forge the HTTP Request the bot is making, but how can I find out how this request is being made?
Trying to send the Accept-Language header with curl wouldn't reproduce the error:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://www.mysite.com.br/');
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept-Language'));
echo $data = curl_exec($ch);
curl_close($ch);
EDIT:
to clarify even further:
There is a "Fetch as Googlebot" feature in Google Webmaster Tools. You might be able to use this to trigger the bot hitting your site. You could even temporarily add a phpinfo() page to your site and use the feature to hit that, which will list all the headers in the response that it shows you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With