473,382 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

special browser cannot display page ...

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
11 2686
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
Try adding a content-length header.

Dec 15 '05 #3
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
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
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
{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
"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
"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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Szar | last post by:
JS noob. I've seen plenty of browser detection scripts but they all seem to be slightly different and don't really fit my needs. I have various places where if the browser is IE I'd like to display...
115
by: J | last post by:
I've run CSSCheck on my style sheets and I always get a warning similar to this: "font: bold 9pt/100% sans-serif Warning: Absolute length units should not generally be used on the Web ..." ...
5
by: spam_me_ not | last post by:
I already understand that one cannot disable a browser's forward and back functions. This is a situation where I have code working in Mozilla V1.6 and would like something similar for Opera and...
50
by: The Bicycling Guitarist | last post by:
A browser conforming to HTML 4.0 is required to recognize &#number; notations. If I use XHTML 1.0 and charset UTF-8 though, does &eacute; have as much support as é ? Sometimes when I run...
5
by: Armand Karlsen | last post by:
On this page of my website: http://www.zen62775.zen.co.uk/rigs.html the W3C html validator claims that there are some bytes it cannot interpret in line 49 of the html source as UTF-8. If I force...
20
by: SMG | last post by:
Hi All, I have created an application which is working fine and is in about to launch, now suddenly my mgmt says there are chances that Scrip ID( a particular id and not prim key) may have special...
2
by: Richard Maher | last post by:
Hi, Recently on the web I came across documentation discussing Data Source Objects (DSO) in relation to browser and html functionality (in particular the ability to declare a Java applet as a...
2
by: chike_oji | last post by:
Hello, I am displaying data retrieved from a database as a httpresponse in a webform. I noticed that some characters such as the comma (,), display as special characters in the web browser...
4
by: sleepy1038 | last post by:
Hello, I'm developing a site that makes use of wordpress. The homepage is outside of wordpress and I am pulling the latest 3 blog posts from the wordpress database to display on the homepage....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.