FeedForAll Forum Index  
 Home  •  FAQ  •   Search   •  Register   •  Profile   •  Log in
 Putting RSS scripts in separate directory View next topic
View previous topic
Post new topicReply to topic
Author Message
randy.barth



Joined: 30 Jun 2010
Posts: 2
Location: Washington, DC

PostPosted: Wed Jun 30, 2010 3:43 pm Reply with quoteBack to top

I'd prefer to keep my RSS scripts in their own directory, devsite.nasa.gov/feed/. That's fine when creating a new merge: devsite.nasa.gov/feed/MergeConf1.php works. But then I'd like to format that on my home page: devsite.nasa.gov/index.php. In that I put

<?php
$XMLFILE = "feed/MergeConfig1.php";
$TEMPLATE = "newstemplate1.html";
$MAXITEMS = "8";
include("feed/rss2html.php");
?>
That gets

$errorCode = 5
xml_error_string() = Invalid document end
xml_get_current_line_number() = 53
xml_get_current_column_number() = 3
xml_get_current_byte_index() = 1479

I added into rss2html.php a statement to dump $convertedXML and it prints

"http://firstsite.gov/RSS", "itemCount" => "2", "feedTTL" => "3600", "feedExtra" => "SOFTWARE REUSE NEWS" ) , // Entry #2 Array("fileURL" => "http://secondsite.gov/RSS", "itemCount" => "2", "feedExtra" => "SOFTWARE REUSE EVENTS" ) ); // // Since we are calling rssMesh.php from here, we don't want // to include a separate config file. $ConfigFilename = "DO_NOT_INCLUDE_CONFIG"; if (!isset($_REQUEST["buildConfig"])) { @include_once("rssMesh.php"); }

(Looks like I forgot to copy the first line, but that gives you the idea.)

I also tried various changes on the code included in the index.php file, like putting a copy of rss2html.php in the root directory so I could drop the "feed/" on the include, moving the MergeConfig1.php to the root, and various other things. The only thing that worked was putting

$XMLFILE = "http://devsite.nasa.gov/feed/MergeConfig1.php"

but I really don't want to do that, as I'd have to change that every time I promoted from the development site to the operational site. I'm sure I must be overlooking something obvious; I can't be the only one who wants to collect the RSS scripts into their own directory. But I didn't see anything on the forums where others had this problem.

_________________
-Randy Barth, NASA, Washington, DC
View user's profile
randy.barth



Joined: 30 Jun 2010
Posts: 2
Location: Washington, DC

PostPosted: Mon Jul 12, 2010 12:53 pm Reply with quoteBack to top

I guess my problem is not so much that it is in a subdirectory, but that I'm reading a php file as though it were xml (RSS). If I give it the PHP file as a URL, it formats it as XML and passes it to me so that's ok. But if there is a way I'm overlooking that I could just get the Mesh output into rss2html, that'd be great.

_________________
-Randy Barth, NASA, Washington, DC
View user's profile
Display posts from previous:      
Post new topicReply to topic


 Jump to:   



View next topic
View previous topic


Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme