Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 example.html.de (<P>Dies ist Deutsch</P>). Now let's take an example PHP script:

<HTML><HEAD><TITLE>Example</TITLE></HEAD><BODY>
<? virtual("/texts/example.html"); ?>
</BODY></HTML>

This works fine, and the output is as expected:

<HTML><HEAD><TITLE>Example</TITLE></HEAD><BODY>
<P>This is English</P>
</BODY></HTML>

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>
<HTML><HEAD><TITLE>Example</TITLE></HEAD><BODY>
</BODY></HTML>

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
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.