Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

First: if acting separately, PHP's virtual() as well as Apache's mod_negotiation work fine. But I've got trouble when virtual() refers to a file which needs negotiation (e.g. Multi-Lang). Easiest explained using a simplified example:

In /texts/ I place two files: example.html (Content: <P>This is English</P>) and (<P>Dies ist Deutsch</P>). Now let's take an example PHP script:

<? virtual("/texts/example.html"); ?>

This works fine, and the output is as expected:

<P>This is English</P>

But now I change the virtual() call to virtual("/texts/example");, with my prefered language set to German. While negotiation picks the correct target, output is messed up:

<P>Dies ist Deutsch</P>

Again: The only thing changed in above code was the parameter to the virtual() call. And those files were doing fine for about 10 years on my other machines -- just on my new one this crazy stuff started:

PHP version: 5.3.10 (on the working machine: 5.2.4)
Apache2 version: 2.2.22 (on the working machine: 2.2.8)

Any idea what could go wrong here?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.