The XML Page Cannot Be Displayed

Problems with the Windows version of XAMPP, questions, comments, and anything related.

The XML Page Cannot Be Displayed

Postby Conor Hyland » 01. September 2010 09:21

Hi Folks,

Just installed the latest version of XAMPP for Windows.
Running the following simple PHP script that connects to another servers XML tree and test that everything works OK:

<?php
$fp = fsockopen('XXX.XXX.XXX.XXX', 'XXXX', $errno, $errstr, 60);
if(!$fp)
{
$success = 1;
}
if($success != 1)
{
fputs($fp, "get /admin.cgi?pass=XXXXXXXX&mode=viewxml http/1.0\r\nuser-agent:(Mozilla Compatible)\r\n\r\n");
while(!feof($fp))
{
$page .= fgets($fp,1000);
}
fclose($fp);
}
$loop = array(SERVERTITLE, WEBHITS);
$y = 0;
while($loop[$y] != '')
{
$pageed = ereg_replace(".*<$loop[$y]>", "", $page);
$phpname = strtolower($loop[$y]);
$$phpname = ereg_replace("</$loop[$y]>.*", "", $pageed);
$y++;
}
echo $servertitle;
?>

But unfortunately I get the following error when going to view the page in IE8 and IE7 from various PCs:

The XML page cannot be displayed
Cannot view XML input using style sheet
Please correct the error and then click the Refresh button, or try again later
Invalid at the top level of the document
Error processing resource 'http://XXX.XXX.XXX.XXX/temp.php'. Line 1, Position 1
HTTP/1.0 200 OK

I have Apache 2.2.14 / PHP 5.2 installed on another machine and the above script works perfectly!
I am wondering what could be causing the error - is there something I need to change in the Apache config file? :?
Have tried to view this test page from different PCs but still get the same error. :(

Any help would be greatly appreciated,
Thanks,
Conor
Conor Hyland
 
Posts: 2
Joined: 01. September 2010 08:38

Re: The XML Page Cannot Be Displayed

Postby JonB » 01. September 2010 15:11

what happens when you open it on the XAMPP machine as http://localhost?

what happens in say -- Firefox, Chrome or Safari?

and then there is this:

The XML page cannot be displayed
Cannot view XML input using style sheet

Invalid at the top level of the document

could be a missing file or an error with a DTD.

my 'guess' is this is not really a XAMPP specific problem, but I have for sure been wrong before... :shock:



Good Luck
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: The XML Page Cannot Be Displayed

Postby Conor Hyland » 02. September 2010 02:21

Hi JonB!

Thanks for your reply! :)

When I open it on the XAMPP machine as http://localhost/temp.php it still comes up with the same error in IE8.
In Safari / Chrome & Firefox it comes up with the following:

HTTP/1.0 200 OK Content-Type:text/xml ]>17201824Top 40 Pop Dance Rockhttp://XXX.XXX.XXX.XXX:XXXXHit Radio 247 - Your Non Stop Hit Music Station!

This is basically a load of data back from the xml tree of the server instead of just the variable I want to echo ($servertitle), which should output just the following:

Hit Radio 247 - Your Non Stop Hit Music Station!

I can't for the life of me figure out why this is happening! :?

On Server 192.168.1.4 (Apache 2.2.14 / PHP 5.2.12 / MySQL Community Server 5.1.48 / phpMyAdmin 3.3.4):

It will output the variable ($servertitle) as "Hit Radio 247 - Your Non Stop Hit Music Station!" regardless of what browser I view it in and regardless whether I use localhost or the IP address of the server.

This is exactly what the script should do!

But on Server 192.168.1.2 (Latest Version Of XAMPP) it will output the page as the above error in IE8 and as the following in every other browser:

HTTP/1.0 200 OK Content-Type:text/xml ]>17201824Top 40 Pop Dance Rockhttp://XXX.XXX.XXX.XXX:XXXXHit Radio 247 - Your Non Stop Hit Music Station!

When I view http://192.168.1.4/temp.php in IE8 on the XAMPP machine it works perfectly! :?

This I would imaging should rule out IE8 as being the cause of the problem and would suggest it has something to do with the XAMPP installation itself, either a change to a config file in Apache / PHP or a missing file or something. :(

Any more help would be greatly appreciated,
Thanks,
Conor
Conor Hyland
 
Posts: 2
Joined: 01. September 2010 08:38

Re: The XML Page Cannot Be Displayed

Postby JonB » 02. September 2010 04:01

Now that I have 'more' details

It appears to me what you are saying is this:

The XAMMP machine is returning the correct values, but for some reason it is also including (echoing) connecxtion/source status information when it outputs the otherwise correct information :?: :?: :?:

Are you still getting any error reports in the Apache log?

like the one about CSS?

Find/locate the CSS file - if there are elements that have been tagged as display: none, AND you are still getting a CSS error - the problem is that the CSS file is either not being found by the server or is not being rendered as CSS.

my best guess-timate

:roll:
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 64 guests