FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 09-18-2008, 03:14 PM
Derek Broughton
 
Default PHTML

Markus Sch÷nhaber wrote:

> Derek Broughton:
>
>> Markus Sch÷nhaber wrote:
>
>>> Nothing you do on your local machine will change the behaviour of the
>>> > server for www.xplanner.org.
>>
>> Nothing? I find that really hard to believe, though I admit I'm having
>> some trouble myself...
>
> I'm talking about the server's behaviour itself, not about circumventing
> the effects this behaviour (like using a proxy that changes the
> Content-Type header or whatever).
> If you can come up with a generally applicable way how I, just by
> fiddling around with my local machine, can manipulate other people's
> servers, please tell me. I'd be very interested.

But you shouldn't need to manipulate anybody else's server - your browser
should be capable of taking an "application/x-httpd-php" content type
(or "useless/garbage") and handling it the same way it handles "text/html".

>> I went through this with somebody else a while back, and he insisted his
>> custom type was correct - and hard to argue with him when IE was handling
>> it out of the box.
>
> I have seen this more than once too. Nevertheless it's irrelevant in
> this case, since there's no "file extension" in http://www.xplanner.org/
> which Internet Exploder could use for it's "we don't care for standards
> - it's the extension which tells what type a file has in Windows and

Even IE handles the content type header. It just happily handles pages
without a content type by mapping the file extension - so does konqueror.
The thing that makes no sense to me is that
kfmclient openURL http://www.xplanner.org/ text/html
still doesn't work, though:
wget http://www.xplanner.org/
kfmclient openURL file:///`pwd`/index.html text/html
does. This proves there's nothing strictly in the file content to prevent a
browser opening it, and that's just the command that konqueror would use to
open a regular html page.

> therefore the same must be true on the internet" way of content type
> "detection".
>
>> I'd be really surprised if it doesn't work for him...
>
> I'd be surprised if it did.

I would have been surprised because it's hard to imagine anybody set up a
website without being able to read even the front page.

In fact, it looks like he probably broke his apache configuration when
upgrading PHP.
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-18-2008, 03:37 PM
Ulin the Tech Mage
 
Default PHTML

On Thu, 2008-09-18 at 00:16 -0500, Darryl Tidd wrote:
> Hey, thanks for all the replys. I contacted the page owner and he
> stated that it is a server problem, and that many people have
> contacted him. He also stated that the provider has been contacted.
> That being said, here are a couple of other things I found.
> In firefox 3, you can go to preferrences and tell firefox to open
> PHTML files with firefox.
> Also, I found xplanner info, downloads, documentation, etc. at
> http://xplanner.codehause.org. It may actually be .com. Not certain as
> I am not at the computer.
> Thanks again to all who replied, hope I can give something to the
> group as well.
> Darryl
>
> On 9/17/08, Darryl Tidd <pcsmasher@gmail.com> wrote:
> > Hello all,
> > I have an issue when I visit http://www.xplanner.org. Firefox prompts me to
> > open or save the file. I don't think this is the default behavior.
> > I have goolgled the issue and have found several things, the problem is,
> > that the solutions I have found are for viewing PHTML on one's own web
> > server.
> > For instance, I have seen solutions that call for changes to apache or
> > apache2 configurations. I don't see how changing my apache configuration on
> > my local machine will help my problem(please do correct me if I'm wrong). I
> > have also seen solutions that call for changes to php configuration, and
> > understand how these may help, but they haven't helped me. I have php5 and
> > apache2 running on my machine.
> > Any assistance will be greatly appreciated.
> > Darryl Tidd
> >
>
> --
> Sent from my mobile device
>
phtml is usually the stuff that is rendered as html from a php file. I
have run into this problem a couple of times when setting up a new
server, but eventually i get all the required packages installed. if the
owner is running ubuntu, he might try installing all packages for LAMP


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-18-2008, 03:49 PM
Markus Sch÷nhaber
 
Default PHTML

Derek Broughton:

> Markus Sch÷nhaber wrote:

>> I'm talking about the server's behaviour itself, not about circumventing
>> the effects this behaviour (like using a proxy that changes the
>> Content-Type header or whatever).

> But you shouldn't need to manipulate anybody else's server - your browser
> should be capable of taking an "application/x-httpd-php" content type
> (or "useless/garbage") and handling it the same way it handles "text/html".

Again: that's not what I'm talking about.
It's undisputed that there are probably many ways to circumvent the
effects of the server's misbehaviour - using a proxy who changes the
Content-Type header to something useful is one way, saving the file to
disk and viewing it from there, as you did, is another (the latter will
probably break links end references, though).
But still, whatever you do on your machine doesn't *solve* the problem,
it can merely make it less painful.

> The thing that makes no sense to me is that
> kfmclient openURL http://www.xplanner.org/ text/html
> still doesn't work, though:

Works for me with the KDE 4.1.1 packages coming with Intrepid.

> wget http://www.xplanner.org/
> kfmclient openURL file:///`pwd`/index.html text/html
> does. This proves there's nothing strictly in the file content to prevent a
> browser opening it,

Of course not. The only problem there is with this site is that the
server is lying about the type of content it serves (and by saving the
resource to disk you very effectively get rid of the wrong Content-Type
header).

Regards
mks

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-18-2008, 04:17 PM
Rashkae
 
Default PHTML

Derek Broughton wrote:
> Markus Sch├Ânhaber wrote:
>
>> Derek Broughton:
>>
>>> Markus Sch├Ânhaber wrote:
>>>> Nothing you do on your local machine will change the behaviour of the
>>>>> server for www.xplanner.org.
>>> Nothing? I find that really hard to believe, though I admit I'm having
>>> some trouble myself...
>> I'm talking about the server's behaviour itself, not about circumventing
>> the effects this behaviour (like using a proxy that changes the
>> Content-Type header or whatever).
>> If you can come up with a generally applicable way how I, just by
>> fiddling around with my local machine, can manipulate other people's
>> servers, please tell me. I'd be very interested.
>
> But you shouldn't need to manipulate anybody else's server - your browser
> should be capable of taking an "application/x-httpd-php" content type
> (or "useless/garbage") and handling it the same way it handles "text/html".

Eh, no, not at all. this is the way IE generally works. If there is a
file name in the URL, IE will use the extension to figure out the file
type and open with the appropriate application.

All other browsers, Firefox, Safari, (I don't know about Opera) always
trust the mime type header. If it's "useless garbage" the stream gets
treated, for all intents and purposes, the same as "binary/application
octec-stream" (paraphrasing from memory, so probably not exactly right)

This will cause some compatibility issues with misconfigured servers,
but otherwise is considered the 'right' way to go.

Usually, the problems are exactly opposite. It's a great irony of the
Universe that Apache installs with mime 'magic' detection enabled by
default. This will often cause files that are supposed to be binary to
be detected as text and Firefox always opens them in the browser. The
only way around it is to right click the link to Save target, whereas MS
IE saves the file to disk the way it was intended to do.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-18-2008, 04:50 PM
Carl Friis-Hansen
 
Default PHTML

Rashkae wrote:
> Derek Broughton wrote:
>> Markus Sch├Ânhaber wrote:
>>
>>> Derek Broughton:
>>>
>>>> Markus Sch├Ânhaber wrote:
>>>>> Nothing you do on your local machine will change the behaviour of the
>>>>>> server for www.xplanner.org.
>>>> Nothing? I find that really hard to believe, though I admit I'm having
>>>> some trouble myself...
>>> I'm talking about the server's behaviour itself, not about circumventing
>>> the effects this behaviour (like using a proxy that changes the
>>> Content-Type header or whatever).
>>> If you can come up with a generally applicable way how I, just by
>>> fiddling around with my local machine, can manipulate other people's
>>> servers, please tell me. I'd be very interested.
>> But you shouldn't need to manipulate anybody else's server - your browser
>> should be capable of taking an "application/x-httpd-php" content type
>> (or "useless/garbage") and handling it the same way it handles "text/html".
>
> Eh, no, not at all. this is the way IE generally works. If there is a
> file name in the URL, IE will use the extension to figure out the file
> type and open with the appropriate application.
>
> All other browsers, Firefox, Safari, (I don't know about Opera) always
> trust the mime type header. If it's "useless garbage" the stream gets
> treated, for all intents and purposes, the same as "binary/application
> octec-stream" (paraphrasing from memory, so probably not exactly right)
>
> This will cause some compatibility issues with misconfigured servers,
> but otherwise is considered the 'right' way to go.
>
> Usually, the problems are exactly opposite. It's a great irony of the
> Universe that Apache installs with mime 'magic' detection enabled by
> default. This will often cause files that are supposed to be binary to
> be detected as text and Firefox always opens them in the browser. The
> only way around it is to right click the link to Save target, whereas MS
> IE saves the file to disk the way it was intended to do.
>

The elinks gives you a nice explanation and presents you with several
possibilities.

The lynx just gives you a Save or Cancel option

--
+---------------------------------+-------------------+
| Carl Friis-Hansen | Fiskeryd Nybygget |
| http://computingconfidence.com/ | 341 91 Ljungby |
| Phone: +46 (0)372 15033 | Sweden |
+---------------------------------+-------------------+



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-18-2008, 06:58 PM
Derek Broughton
 
Default PHTML

Rashkae wrote:

> Derek Broughton wrote:
>> Markus Sch├Ânhaber wrote:
>>
>>> Derek Broughton:
>>>
>>>> Markus Sch├Ânhaber wrote:
>>>>> Nothing you do on your local machine will change the behaviour of the
>>>>>> server for www.xplanner.org.
>>>> Nothing? I find that really hard to believe, though I admit I'm having
>>>> some trouble myself...
>>> I'm talking about the server's behaviour itself, not about circumventing
>>> the effects this behaviour (like using a proxy that changes the
>>> Content-Type header or whatever).
>>> If you can come up with a generally applicable way how I, just by
>>> fiddling around with my local machine, can manipulate other people's
>>> servers, please tell me. I'd be very interested.
>>
>> But you shouldn't need to manipulate anybody else's server - your browser
>> should be capable of taking an "application/x-httpd-php" content type
>> (or "useless/garbage") and handling it the same way it handles
>> "text/html".
>
> Eh, no, not at all.

Er, yes. It's simply a matter of defining the associations in the browser.

> this is the way IE generally works. If there is a
> file name in the URL, IE will use the extension to figure out the file
> type and open with the appropriate application.

In any case, IE _does_ honour the content type header.

> All other browsers, Firefox, Safari, (I don't know about Opera) always
> trust the mime type header. If it's "useless garbage" the stream gets
> treated, for all intents and purposes, the same as "binary/application
> octec-stream" (paraphrasing from memory, so probably not exactly right)

Not if there's a "useless/garbage" mimetype defined for your browser - which
was my point: you can do that. It's not _right_ to be forcing your browser
to handle mimetypes that are only being delivered by a misconfigured
server, but it should at least be possible.
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-18-2008, 08:10 PM
Rashkae
 
Default PHTML

Derek Broughton wrote:

>
> In any case, IE _does_ honour the content type header.
>

I created some elaborate tests to prove you wrong (well, elaborate for
someone who can barely scratch out Hello world) and ended up proving you
right instead. If the content type header is one that IE recognizes, it
gets handled correctly. Including text/plain, which gets opened in the
browser rather than downloaded, even if I give it a .bin extension.

Strangely enough, content type application/octec-stream resorts to
identification from the file name. so an .html file will get opened in
IE, whereas firefox will give you the file download dialogue, (with the
option to open in the browser).

This didn't work nearly so well last time I tested it with IE 4, but my
bad for spreading such outdated info.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-18-2008, 09:45 PM
Derek Broughton
 
Default PHTML

Rashkae wrote:

> Derek Broughton wrote:
>
>>
>> In any case, IE _does_ honour the content type header.
>>
>
> I created some elaborate tests to prove you wrong (well, elaborate for
> someone who can barely scratch out Hello world) and ended up proving you
> right instead.

Thanks :-)

> If the content type header is one that IE recognizes, it
> gets handled correctly. Including text/plain, which gets opened in the
> browser rather than downloaded, even if I give it a .bin extension.
>
> Strangely enough, content type application/octec-stream resorts to
> identification from the file name. so an .html file will get opened in
> IE, whereas firefox will give you the file download dialogue, (with the
> option to open in the browser).

That doesn't really surprise me - octet-stream is a fallback, so it
generally means that Apache (or other web server) couldn't figure out what
it really should have been, and it's not hugely unreasonable for a browser
to try to second guess it.

> This didn't work nearly so well last time I tested it with IE 4, but my
> bad for spreading such outdated info.

IE does _lots_ of things wrong, and the things it does right, it does
kicking and screaming (like tabs - which they insisted their customers
would have asked for if they really wanted them - but they don't give
their "customers" any way to ask), but eventually they manage to get most
things right. Given that mime types have been around since the dawn of the
web, they _should_ be able to get it right by now!
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 05:22 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ę2007 - 2008, www.linux-archive.org