PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
micah
Hangin' Around


Joined: May 25, 2006
Posts: 40

PostPosted: Mon Mar 16, 2009 10:45 am Reply with quote Back to top

This is the error that I keep on getting.

XML Parsing Error: XML or text declaration not at start of entity
Location:
Only registered users can see links on this board!
Get registered or login to the forums!

Line Number 64, Column 1:<?xml version="1.0" encoding="ISO-8859-1"?>

Any help to fix this would be appreciated.
Micah
View user's profile Send private message
jakec
Site Admin


Joined: Feb 06, 2006
Posts: 3038
Location: United Kingdom

PostPosted: Mon Mar 16, 2009 12:22 pm Reply with quote Back to top

What version of nuke are you using?
View user's profile Send private message
micah
Hangin' Around


Joined: May 25, 2006
Posts: 40

PostPosted: Mon Mar 16, 2009 1:10 pm Reply with quote Back to top

7.6 patched
View user's profile Send private message
micah
Hangin' Around


Joined: May 25, 2006
Posts: 40

PostPosted: Mon Mar 16, 2009 1:11 pm Reply with quote Back to top

no that's not true .. i just checked the config - 7.9
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Mon Mar 16, 2009 5:44 pm Reply with quote Back to top

Get rid of those 63 blank lines and it should work just fine.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
micah
Hangin' Around


Joined: May 25, 2006
Posts: 40

PostPosted: Mon Mar 16, 2009 7:25 pm Reply with quote Back to top

Now I feel like i am being a pain but I can't seem to be able to get rid of those blank lines. I have checked y header.php and my theme file and I can;t see anything out of whack.

Suggestions would be helpful

Micah
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Mon Mar 16, 2009 10:46 pm Reply with quote Back to top

Prayer, Mr. Micah. The Klingons don't take prisoners Wink

Check your backend.php file.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
micah
Hangin' Around


Joined: May 25, 2006
Posts: 40

PostPosted: Tue Mar 17, 2009 8:21 am Reply with quote Back to top

Raven ...

If I comment out the line header("Content-Type: text/xml"); I get a printout at least but it is not in the correct format. Everything else looks good to me.

Sorry but I just have no clue on this one
Micah


include("mainfile.php");
include("includes/ipban.php");
global $prefix, $db, $nukeurl;
header("Content-Type: text/xml");
$cat = intval($cat);
if (isset($cat) && !empty($cat)) {
$catid = $db->sql_fetchrow($db->sql_query("SELECT catid FROM ".$prefix."_stories_cat WHERE title LIKE '%$cat%' LIMIT 1"));
if ($catid == "") {
$result = $db->sql_query("SELECT sid, title, hometext FROM ".$prefix."_stories ORDER BY sid DESC LIMIT 10");
} else {
$catid = intval($catid);
$result = $db->sql_query("SELECT sid, title, hometext FROM ".$prefix."_stories WHERE catid='$catid' ORDER BY sid DESC LIMIT 10");
}
} else {
$result = $db->sql_query("SELECT sid, title, hometext FROM ".$prefix."_stories ORDER BY sid DESC LIMIT 10");
}

echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n";
echo "<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"\n";
echo " \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n\n";
echo "<rss version=\"0.91\">\n\n";
echo "<channel>\n";
echo "<title>".htmlentities($sitename)."</title>\n";
echo "<link>$nukeurl</link>\n";
echo "<description>".htmlentities($backend_title)."</description>\n";
echo "<language>$backend_language</language>\n\n";

while ($row = $db->sql_fetchrow($result)) {
$rsid = intval($row['sid']);
$rtitle = filter($row['title'], "nohtml");
$rtext = filter($row['hometext']);
echo "<item>\n";
echo "<title>".htmlentities($rtitle)."</title>\n";
echo "<link>$nukeurl/modules.php?name=News&amp;file=article&amp;sid=$rsid</link>\n";
echo "<description>".htmlentities($rtext)."</description>\n";
echo "</item>\n\n";
}
echo "</channel>\n";
echo "</rss>";

?>
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Wed Mar 18, 2009 12:16 am Reply with quote Back to top

Micah,

We have long stated that all releases after nuke 7.6 are not to be trusted. Be that as it may,

Did it ever work?
If so, just before it stopped working did you make any changes to your system?
If so then restore the files to their previous state.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
micah
Hangin' Around


Joined: May 25, 2006
Posts: 40

PostPosted: Wed Mar 18, 2009 11:20 am Reply with quote Back to top

It used to work ... I did not realize that it was not working any more.

The thing is that all files look good to me but I thin that part of the problem is that site wide there are the 63 blank spaces at the top of each page in the source file. I can;t get rid of those either ... but I think that if i can fix that the backend problem will be resolved as well. that is why I started looking at the header and index file first but I just can not find the problem that is causing all of those blank spaces.


micah
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Wed Mar 18, 2009 11:29 am Reply with quote Back to top

I know that getting rid of those will fix the problem because I tried it Wink

Now, if all your source files have those 63 lines in them then I would say you're probably using an editor like notepad or wordpad and transferring your files using ASCII. Is that a remote possibility?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
micah
Hangin' Around


Joined: May 25, 2006
Posts: 40

PostPosted: Wed Mar 18, 2009 11:32 am Reply with quote Back to top

yes ... that is exactly what I am doing ... but I didn't know that was a problem
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Wed Mar 18, 2009 2:45 pm Reply with quote Back to top

This has been discussed several times but you wouldn't know that w/o knowing it was a problem - Catch-22. You should not use notepad nor wordpad to edit your files to be ftp'd. They mishandle line endings, add extra characters and are the source of all kinds of evil Wink. There are several good code editors available and several are free. Notepad++ is just one. If you search the forums here for editors or Textpad you will find several others mentioned. Then, if you use *nix for your production host, you should transfer all files to your hosting account in BINARY.

I would recommend that you ftp your core files, at a minimum, in binary and see if that helps. You should also change all your line endings, via a good editor that you will be getting Wink to Unix.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum