Welcome to Geeklog, Anonymous Saturday, April 20 2024 @ 03:39 am EDT

Geeklog Forums

RDF empty?


Status: offline

rockcohen

Forum User
Newbie
Registered: 07/03/03
Posts: 5
working
Hi y\'all, I just moved my Geeklog V1.3.6 from my school account (IRIX) to some account at an ISP (Win2k). I simply moved all files, exported the database and imported it at the new server, changed some paths in config.php and did set all the required CHMOD\'s (verified with the /admin/checkconfig.php script). Everything works just fine, except for that the /backedn/geeklog.rdf is not being updated, it\'s plain empty. Why-o-Why?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The .rdf file is only updated when you save a story. Am I right that you did not create a new story since you've moved the site? If so, simply open any existing story and save it again. That should update the .rdf file.

bye, Dirk
 Quote

Status: offline

rockcohen

Forum User
Newbie
Registered: 07/03/03
Posts: 5
Hum hey actually.. it does get updated! It\'s IExplorer that screws up. It just shows an empty page. Must be some issue with IExplorer not recognizing the rdf file as XML ? Check it out, it\'s this one here: http://www.van-els.nl/backend/geeklog.rdf
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
When I go to that URL using Mozilla, it tries to download the .rdf as a binary file. So it seems your server configuration is not correct. Not sure what the correct MIME type for .rdf is, but try text/plain.

bye, Dirk
 Quote

Status: offline

rockcohen

Forum User
Newbie
Registered: 07/03/03
Posts: 5
Argh... yeah well its my ISP .. I cannot change it :-( Isn\'t there some PHP way of modifying the header and set the MIME type from PHP?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
PHP won't help here, since the .rdf is simply a file that's read by the browser or whatever comes by - PHP is not involved at this stage. Is your site running on Apache? Then you could try creating a .htaccess file with this line in it:
Text Formatted Code
AddType text/html rdf
That should work if your ISP isn't too restritive. bye, Dirk
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Did some research on the correct MIME type for a RSS/RDF feed. Apparently, MIME types application/rss+xml and application/rdf+xml have been proposed for these but they\'re not official yet. So text/plain should be fine to use for now. bye, Dirk
 Quote

Status: offline

rockcohen

Forum User
Newbie
Registered: 07/03/03
Posts: 5
Nope, its IIS ... ok I will look and see if something similair is possible under IIS... Thanks so far, Rob
Quote by Dirk: PHP won't help here, since the .rdf is simply a file that's read by the browser or whatever comes by - PHP is not involved at this stage. Is your site running on Apache? Then you could try creating a .htaccess file with this line in it:
Text Formatted Code
AddType text/html rdf
That should work if your ISP isn't too restritive. bye, Dirk
 Quote

Status: offline

rockcohen

Forum User
Newbie
Registered: 07/03/03
Posts: 5
Hi all, ok I've written a work around for the MIME-TYPE problem. It's quick N Dirty but should work on all systems. Just copy+patse the following code and save it in the /backend/ folder as 'rss-feed.php' or something --start code--
Text Formatted Code
 path to rdf file
$rss_xml_data = binarysafe_file_get_contents($_CONF['rdf_file']);
echo $rss_xml_data ;

function binarysafe_file_get_contents($filename) {
   $fd = fopen("$filename", "rb");
   $content = fread($fd, filesize($filename));
  fclose($fd);
   return $content;
}

?>
 
--end code--
 Quote

All times are EDT. The time is now 03:39 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content