By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,130 Members | 2,141 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,130 IT Pros & Developers. It's quick & easy.

special browser cannot display page ...

P: n/a
Hi,

I'm trying to do something I thought easy. Explanation : I've recently
bought a Multimedia Player DVX-500E. This player is connected via ethernet
on my local network et allows among other things to browse web pages (not
everyone).
I don't know anything about this browser nor about media server implentation
(on the pc side).
I want to browse a page with Tv schedule (a simplified version of
EuroTV.com). To do that, I've created a php page :

<?

$sFile =
file_get_contents("http://www.eurotv.com/scripts/Nowoutprint.cfm?Language=fr&AvailableIn=Belgium&Ty peAll=true&DisplaySummary=YES");
$sFile = utf8_decode($sFile);
$sFile = ltrim($sFile);
$sFile = preg_replace ("/>\n</", " ", $sFile);
$sFile = preg_replace ("/>\s\s+</", "><", $sFile);

echo $sFile;
?>

This page cannot be displayed in the browser, however it displays correctly
under IE, Mozilla, Netscape.
Nothing surprising till here. What's surprising is that if copy-paste the
source code in a new file (.htm), this page is then displayed correctly
without any problem).
I've teste with other php pages that display correctly in this browser.
Ok, so I was wondering if the problem was a problem of headers. I've looked
both headers (of the .php and .htm pages) with the online tool :
http://tools.apocalx.com/entete-http/
Then I added this code to make the headers (of the .php and .htm) being
similar :

header("ETag: \"e5d8-32a6-c58d3b77\"");
header("Accept-Ranges: bytes");
header("Content-Type: text/html");
header("Last-Modified: Wed, 14 Dec 2005 23:21:31 GMT");

I've check the headers with the online tool mentioned above and there are
similar.
But it still doesn't work...

Someone has an idea about where the problem can come from ?

PS: The only error message I get is a short "Sorry, the page cannot be
displayed". So, no help on that side (this code is generated either by the
firmware of the DVX-500E or by the media server code on the pc side. Both
are opaque, proprietary codes).

Thanks.

Laurent Compere
Dec 15 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Laurent Compere wrote:

<snip>
This page cannot be displayed in the browser, however it displays
correctly under IE, Mozilla, Netscape.
Nothing surprising till here. What's surprising is that if copy-paste the
source code in a new file (.htm), this page is then displayed correctly
without any problem).


Hi,

Hard to say, but if the same sourcecode is working when saved as a
html-file, your problem could be fragmented datapackages send by the
webserver.
Some browsers, even IE on some OS's, cannot handle that very well.

Try putting above your script: ob_start();

That enables output buffering, meaning PHP will send the output in one
stream.

I may solve your problem.
(As you understand: this is just guessing)

If that doesn't help try this:
Rename the saved sourcecode to test.php instead od test.html.
Maybe your (crippled) browser only wants to display stuff named .html.

Both can be tested very quickly.
Good luck,
Erwin Moller
Dec 15 '05 #2

P: n/a
Try adding a content-length header.

Dec 15 '05 #3

P: n/a
First of all, thank you for your help Erwin.
Hi,

Hard to say, but if the same sourcecode is working when saved as a
html-file, your problem could be fragmented datapackages send by the
webserver.
Some browsers, even IE on some OS's, cannot handle that very well.

Try putting above your script: ob_start();

That enables output buffering, meaning PHP will send the output in one
stream.

I may solve your problem.
(As you understand: this is just guessing)

I tried this and it doesn't work.
If that doesn't help try this:
Rename the saved sourcecode to test.php instead od test.html.
Maybe your (crippled) browser only wants to display stuff named .html.


I did this also even if I was convinced that page would be displayed
correctly.
I was wrong. The page cannot be displayed either.
But this is still very very strange since I can display another page which
is also php and which is much more complicated than this one (with css,
javascript, session, cookies, forms, ...). This is for sure a crippled
browser.

So so so ... What's the problem ?

I'm still searching ...

Laurent Compere.
Dec 15 '05 #4

P: n/a
But there is already a content-length header.
I think now that the problem is somewhere else. That must be something
really subtle like a big bug ... but I'd prefere to be wrong.

"Chung Leong" <ch***********@hotmail.com> a écrit dans le message de news:
11*********************@z14g2000cwz.googlegroups.c om...
Try adding a content-length header.

Dec 15 '05 #5

P: n/a
I have ran into a similiar problem before with Mircosoft ISA before.
The solution was...convert the dynamic script to plain-o HTML. I would
get a HTTP sniffer and see what's actually sent by the server. PHP does
add its own headers.

One possibility is that the server is using chunk-encoding. Another is
possibility is compression. I would also try disabling connection
keep-alive on the server.

Dec 15 '05 #6

P: n/a
{top-post fixed. Please don't top-post]

Laurent Compere wrote:
"Chung Leong" <ch***********@hotmail.com> a écrit dans le message de news:
11*********************@z14g2000cwz.googlegroups.c om...
Try adding a content-length header.

But there is already a content-length header.
I think now that the problem is somewhere else. That must be something
really subtle like a big bug ... but I'd prefere to be wrong.


I just sniffed with LiveHTTPHeader plugin of Firefox.

http://www.eurotv.com/scripts/Nowout...laySummary=YES

GET
/scripts/Nowoutprint.cfm?Language=fr&AvailableIn=Belgium&Ty peAll=true&DisplaySummary=YES
HTTP/1.1
Host: www.eurotv.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8)
Gecko/20051111 Firefox/1.5
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: SECONDS=0; HITCOUNT=2; CFID=6733558; CFTOKEN=46151058

HTTP/1.x 200 OK
Server: Microsoft-IIS/5.0
Date: Fri, 16 Dec 2005 05:23:59 GMT
Connection: close
Set-Cookie: HITCOUNT=0;path=/
Set-Cookie: SECONDS=5;path=/
P3P: CP="NOI DSP PSAa PSDa OUR BUS UNI"
Content-Language: fr-BE
Content-Type: text/html; charset=UTF-8
----------------------------------------------------------

As Chung said, there is no Content-Length header. As an other way,
just try logging the $_SERVER vars in a log file at server-end and see
what your client is actually sending and why the server is responding
so.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Dec 16 '05 #7

P: n/a
"R. Rajesh Jeba Anbiah" <ng**********@rediffmail.com> a écrit dans le
message de news: 11*********************@o13g2000cwo.googlegroups.c om...
{top-post fixed. Please don't top-post]
I just sniffed with LiveHTTPHeader plugin of Firefox. http://www.eurotv.com/scripts/Nowout...laySummary=YES ... As Chung said, there is no Content-Length header. As an other way,
just try logging the $_SERVER vars in a log file at server-end and see
what your client is actually sending and why the server is responding
so.


Actually, I haven't tested the header of that page but the one I created in
php (the one that gets the content of the page you give. And with this one,
I get a content-length header.
I'm going to play with this Firefox plugin to see what's really happening on
the header side.
But if there would be no content-length header how could I set one since I
don't know the length (it's a dynamic page) ?

Thank you
Dec 16 '05 #8

P: n/a
"Chung Leong" <ch***********@hotmail.com> a écrit dans le message de news:
11**********************@g49g2000cwa.googlegroups. com...
I have ran into a similiar problem before with Mircosoft ISA before.
Microsoft ISA, I don't know that ... What is it ?
a web server ?
The solution was...convert the dynamic script to plain-o HTML. I would
get a HTTP sniffer and see what's actually sent by the server. PHP does
add its own headers.
I cannot convert to static page since the content is dynamic.
I'm going to play with the firefox plugin mentioned by R. Rajesh Jeba Anbiah
to sniff http headers...
One possibility is that the server is using chunk-encoding. Another is
possibility is compression. I would also try disabling connection
keep-alive on the server.


I tried the function ob_start() mentioned by Erwin Moller but it didn't
help.
I installed the web server myself and didn't add any extension for
compression. Is it possible that some compression would be made natively by
Apache (2.0.54) ?

Thanks
Dec 16 '05 #9

P: n/a
Laurent Compere wrote:
<snip>
I'm going to play with the firefox plugin mentioned by R. Rajesh Jeba Anbiah
to sniff http headers...


If I'm right, you're using a different browser. So, it's better to
sniff at the server end too; like what the client is requesting.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Dec 16 '05 #10

P: n/a
Laurent Compere wrote:
<snip>
But if there would be no content-length header how could I set one since I
don't know the length (it's a dynamic page) ?


http://in2.php.net/ob_get_length#13715

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Dec 16 '05 #11

P: n/a
Laurent Compere wrote:
Microsoft ISA, I don't know that ... What is it ?
a web server ?
ISA = Internet Security & Acceleration Server. It's a proxy server cum
firewall.
I tried the function ob_start() mentioned by Erwin Moller but it didn't
help.
When you send the contents in one chunk with the help of output
buffering, that'd disable chunk encoding by Apache, so that's probably
not the problem...
I installed the web server myself and didn't add any extension for
compression. Is it possible that some compression would be made natively by
Apache (2.0.54) ?


Don't think so. PHP can also do on-the-fly gzip compression of output.
Try turning it on. I once solved a mystery problem that way. Another
thing to try is forcing the use of HTTP 1.0 by sending a "HTTP/1.0 200
OK" header.

Dec 16 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.