You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Rodrigo Hidalgo <ro...@linux-friends.org> on 2001/12/06 17:22:32 UTC

Weird mozilla,lynx,IE + apache + php problem

Hi all,

Ive had a strange and weird problem that i actually solved now but would
like youre comments on.

Problem with php source showing(And yes i have a working php install ;).

Apache 1.3.20 and php 4.x

If you have a swap file like "www.site.com/index.php~", you can via
mozilla/lynx(havent tried opera) see the php source by writing
"www.site.com/index".

With IE 6 i get the correct output.

Now i have setup a "files" directiv in httpd.conf so you can`t access
the swap files, the swap files should not exist in this area but there are
probably alot of people just like me that currently have not errased them
or setup restrictions.

I have confirmed that a Mandrake 8.1 with apache 1.3.22 dosent have the
problem, so my question is have any of you heard about this bug(Or if i
missed anything in the config).

You can actually see in the apache respond that it send different answers
for mozilla and IE.

Here are the http requests:

IE

GET /tha_man HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-powerpoint, application/vnd.ms-excel,
application/msword, */*
Accept-Language: sv
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461)
Host: www.linux-friends.org
Connection: Keep-Alive

HTTP/1.1 200 OK
Date: Thu, 06 Dec 2001 13:17:51 GMT
Server: Apache/1.3.20 (Unix)
Content-Location: tha_man.php
Vary: negotiate,accept
TCN: choice
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html

Mozilla

GET /tha_man HTTP/1.1
Host: www.linux-friends.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.5)
Gecko/20011011
Accept: text/xml, application/xml, application/xhtml+xml, text/html;q=0.9,
image/png, image/jpeg, image/gif;q=0.2, text/plain;q=0.8, text/css,
*/*;q=0.1
Accept-Language: en-us
Accept-Encoding: gzip, deflate, compress;q=0.9
Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
Keep-Alive: 300
Connection: keep-alive

HTTP/1.1 200 OK
Date: Thu, 06 Dec 2001 13:17:58 GMT
Server: Apache/1.3.20 (Unix)
Content-Location: tha_man.php~
Vary: negotiate,accept
TCN: choice
Last-Modified: Wed, 07 Nov 2001 09:13:06 GMT
ETag: "1f685-44b-3be8fb22;3c0e1919"
Accept-Ranges: bytes
Content-Length: 1099
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/plain



Rodrigo Hidalgo C.

Any intelligent fool can make things bigger, more complex, and more
violent. It takes a touch of genius -- and a lot of courage -- to move in
the opposite direction.

Albert Einstein (1879-1955)

-----------------
 /             /
_---_    _---_/
-___-____-___-
Linux-Friends.org
-----------------






---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Weird mozilla,lynx,IE + apache + php problem

Posted by Rodrigo Hidalgo <ro...@linux-friends.org>.
Ok great,

I turned of MultiViews and the problem is gone.

Interesting response though, that mozilla get´s one and IE another.

Thanks.



Rodrigo Hidalgo C.

Any intelligent fool can make things bigger, more complex, and more
violent. It takes a touch of genius -- and a lot of courage -- to move in
the opposite direction.

Albert Einstein (1879-1955)

-----------------
 /             /
_---_    _---_/
-___-____-___-
Linux-Friends.org
-----------------

On Thu, 6 Dec 2001, Joshua Slive wrote:

> Date: Thu, 6 Dec 2001 11:32:48 -0500
> From: Joshua Slive <jo...@slive.ca>
> Reply-To: users@httpd.apache.org
> To: users@httpd.apache.org
> Subject: RE: Weird mozilla,lynx,IE + apache + php problem
>
>
> > From: Rodrigo Hidalgo [mailto:rodde@linux-friends.org]
>
> > If you have a swap file like "www.site.com/index.php~", you can via
> > mozilla/lynx(havent tried opera) see the php source by writing
> > "www.site.com/index".
>
> The best advice is to turn off Multiviews unless you really need it.  It has
> been turned on in the default httpd.conf for a while to let the
> multi-language "it worked" page function, but that was probably a mistake.
>
> There were also several changes in 1.3.22 to the Multiviews code that may
> have changed this behaviour, and a complete rewrite in 2.0.  I don't
> recommend using Multiviews in 1.3.22 at all, however, because it trashes the
> query string.
>
> I don't know exactly what is happening in your case (these negotiation
> things are very difficult to figure out), but it has to do with apache
> negotiating between different versions of a file, and then favouring the one
> that has no attributes attached to it (because the .php~ extension is
> unrecognized).
>
> Joshua.
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: Weird mozilla,lynx,IE + apache + php problem

Posted by Joshua Slive <jo...@slive.ca>.
> From: Rodrigo Hidalgo [mailto:rodde@linux-friends.org]

> If you have a swap file like "www.site.com/index.php~", you can via
> mozilla/lynx(havent tried opera) see the php source by writing
> "www.site.com/index".

The best advice is to turn off Multiviews unless you really need it.  It has
been turned on in the default httpd.conf for a while to let the
multi-language "it worked" page function, but that was probably a mistake.

There were also several changes in 1.3.22 to the Multiviews code that may
have changed this behaviour, and a complete rewrite in 2.0.  I don't
recommend using Multiviews in 1.3.22 at all, however, because it trashes the
query string.

I don't know exactly what is happening in your case (these negotiation
things are very difficult to figure out), but it has to do with apache
negotiating between different versions of a file, and then favouring the one
that has no attributes attached to it (because the .php~ extension is
unrecognized).

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org