Welcome Guest, Not a member yet? Register   Sign In
Beginner googlebot problem
#1

[eluser]canado[/eluser]
Hi everyone

I have a big problem, my site gets indexed by google but with a php error as follow

Code:
<div>

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message:  Undefined offset:  0</p>
<p>Filename: core/MY_Lang.php</p>
<p>Line Number: 163</p>

</div><div>

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message:  Undefined index:  </p>
<p>Filename: core/MY_Lang.php</p>
<p>Line Number: 71</p>

</div><div>

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message:  Undefined offset:  0</p>
<p>Filename: core/MY_Lang.php</p>
<p>Line Number: 163</p>

</div><div>

<h4>A PHP Error was encountered</h4>

<p>Severity: Warning</p>
<p>Message:  Cannot modify header information - headers already sent by (output started at /homez.43/sophiec/www/system/core/Exceptions.php:170)</p>
<p>Filename: core/MY_Lang.php</p>
<p>Line Number: 77</p>

</div>


but when I check the root in the browser everything is fine, it redirects to mywebsite.com/en/home with no errors

any idea?
#2

[eluser]canado[/eluser]
Ok I had to change this MY_Lang.php

Code:
/*if($browser_lang)
  {
   return (array_key_exists($browser_lang, $this->languages)) ? $browser_lang: 'en';
  }else{
   return $this->languages[0];
  }*/

into that

Code:
if ( !$browser_lang ) {
        return array_shift(array_keys($this->languages));
        }
        else {
        return (array_key_exists($browser_lang, $this->languages)) ? $browser_lang: array_shift(array_keys($this->languages));
        }


which is a bit better, but now I have this

HTTP/1.1 302 Moved Temporarily
Set-Cookie: 90plan=R3938748381; path=/; expires=Sun, 25-Mar-2012 02:05:58 GMT
Date: Thu, 22 Mar 2012 13:45:53 GMT
Server: Apache/2.2.X (OVH)
X-Powered-By: PHP/5.2.17
Location: http://www.mysite.com/en/home
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 20
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html




Theme © iAndrew 2016 - Forum software by © MyBB