I'm running Drupal 6.x and have the latest updates installded but recently have been getting a strange error when trying to load the page in Firefox 6 or 7. It seems to work fine in Chrome though??

I've tried changing the theme to a different one and to a stock drupal theme. All to no avail.

Am rather clueless as to what is causing this?

Image showing the error I get...

Resolved now. Deleted .inc files and index.php and replaced from .tar file of 6.22 and fixed it.

Comments

vm’s picture

tends to be a problem of whitespace in a file either at the beginning or at the end. However, it's odd that it's browser dependent.

see: http://drupal.org/node/1424

jaypan’s picture

It is odd that it's browser dependent - but maybe Chrome has decided to accept headers even after output has been sent to the browser? I've never heard of that though.

Anyways, it looks like you have an error in your index.php. As this is a file that should never be edited, you should be safe just overwriting it with a fresh index.php. See if that helps.

Contact me to contract me for D7 -> D10/11 migrations.

benmalen’s picture

This is a PHP server side error and has nothing to do with the browser. The only reason it would show in one browser and not another is because of local browser cache.

Basically why this is happening:

Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP. It is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called. The same problem exists when using a single PHP/HTML file.

<html>
<?php
/* This will give an error. Note the output
 * above, which is before the header() call */
header('Location: http://www.example.com/');
?>
Anonymous’s picture

Thanks, deleted all of the .inc files and the index.php file and replaced them with the ones from the 6.22 tarball.

No idea how they ended up breaking or changing? might well of been some server update stuff or something. Have no idea, but it is fixed now.

Thanks!