473,805 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_conten ts("http://www.eurotv.com/scripts/Nowoutprint.cfm ?Language=fr&Av ailableIn=Belgi um&TypeAll=true &DisplaySummary =YES");
$sFile = utf8_decode($sF ile);
$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 2747
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************* ********@z14g20 00...legro ups.com...
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************* ********@z14g20 00...legro ups.com...
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&Av ailableIn=Belgi um&TypeAll=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,ima ge/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=4615105 8

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**********@r ediffmail.com> a écrit dans le
message de news: 11************* ********@o13g20 00...legro ups.com...
{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************* *********@g49g2 00...legr oups.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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
10074
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 else . For example, if a browser is IE I want to use this CSS file otherwise use a different one and if it's IE make this cell x pixels high else make it y pixels high. I'm sure this is easy, please excuse my stupidity. Steve.
115
7249
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 ..." Yet if I use 'x-small' instead of 9pt, I get bigger type on IE6 and smaller type on Mozilla. My choices seem to be:
5
7547
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 IE. I link within a page and display individual divisions of that page, manipulating their visibility and display styles with an onClick function. As long as I explicitly click a link to progress, it works with browsers I've tried.
50
4360
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 the TIDY utility on my code, it replaces my character notations with weird looking things I don't recognize. Also, when I converted to UTF-8 from ISO-8859-1, I discovered many special characters
5
8718
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 ISO-8859-1 encoding, however, the page will validate correctly but displays a warning about the & character on the same line, saying that & is the "first character of a delimiter but occurred as data". Is there any way to remedy this problem/issue?...
20
9402
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 characters like '&,*,),( or /' This data(field/key) I am passing this value as a querystring. e.g. value to be passed : ABC http://localhost/myProj/abc.aspx?ScripID=ABC
2
2105
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 data source that can be used with any or the HTML tags that take the src="" attribute). I find it interesting and potentially *very* useful and would like to know more, so if anyone can answer any of the following questions that would be great: - ...
2
2364
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 (Internet Explorer). It displays something like $^^% instead of a comma. Please how can I have the browser display the comma as it is from the database.
4
3775
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. The problem is that special characters (&mdash;) for example, do not display properly. It displays as a "?" with a diamond around it �. The characters actually display fine withing the wordpress blog portion of the site. I tried changing the...
0
9718
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10614
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10363
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10369
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10109
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.