4

I'm experiencing a behaviour of Google Chrome (Google Chrome 7.0.517.41 beta) that I can't understand. In some cases, Google Chrome downloads the source code of the PHP script that is requested from my server instead of it being executed. I don't have this problem with cURL or Firefox; when I request the same URL with them the script is executed properly.

This seems to me rather odd because I this should be a server issue and it should work the same in every browser. I think I must have overlooked something or Google Chrome is sending some unusual HTTP headers... I don't know. I've checked AddHandler and AddType directives in Apache configuration files with no success. Do you have any idea what might be causing this?

10
  • Link to pages where this happens ?
    – Chris
    Oct 16, 2010 at 13:55
  • This is an issue on my development server which is currently not public so I can't give any links. Oct 16, 2010 at 14:06
  • 1
    If you can actually download the source, it is definitely a bug in the webserver, and not related to user-agent (or only related in that a certain request can trigger an error condition in the webserver itself, which should never happen, and is still a problem of the webserver). Check apache error logs, and if you cannot find any problems there, I'd just go for a reinstall, as I wouldn't trust the current setup at any level anymore.
    – Wrikken
    Oct 16, 2010 at 15:45
  • Yes, I know there is a problem in the webserver but it must be caused by something in Google Chrome's requests. I've checked error.log and it looks perfectly fine. So you propose to re-install Apache or something else as well? Oct 16, 2010 at 16:06
  • How do the request headers send by Chrome differ from those sent by FireFox?
    – Jon Cram
    Oct 16, 2010 at 16:45

1 Answer 1

11

The solution for this issue was to clear the Google Chrome's cache which seems to hold some data cached for too long. It was probably wrong on the server as it was sending raw PHP code previously but due to caching this issue persisted for Google Chrome even after it was fixed.

Thanks to Jon Cram for the suggestion.

1
  • Thanks! Seems like chrome really keeps stuff around for a while.
    – user67416
    Dec 15, 2010 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.