Welcome to Geeklog, Anonymous Thursday, December 26 2024 @ 01:20 pm EST

Geeklog Forums

Parse error in static page


Sully

Anonymous
I have a static page that I use to include an rss feed. For months it was fine and today with no change by me I get a parse error:

Text Formatted Code
       
Parse error: parse error, unexpected '&' in /GeekLog/public_html/staticpages/index.php(59) : eval()'d code on line 1
 


The static page simple consists of:

Text Formatted Code
require_once("/php/rss2html.php?MAXITEMS=3");
 


Again, this has worked for months and with no reason that I can see it stopped working today.

I did see this weird error that looks like a user was mucking round with things just prior to the parse errors but don't think it is related:

Text Formatted Code
[client 71.124.169.19] PHP Warning:  Unknown: failed to open stream: HTTP request failed!
\x8err\x06\xc8!\xc1\xbf\xb4u\xcd\tG in /GeekLog/plugins/staticpages/functions.inc(523) :
eval()'d code on line 1
 


Any ideas?
 Quote

Status: offline

J23

Forum User
Newbie
Registered: 07/24/05
Posts: 6
Location:Canada
Hi,

I had the same problem, and this is the solution for that:

1. need to open and add the code to your lib-custom.php file

Text Formatted Code
// Custom RDF / RSS feed on static page
function static_rdf($blockid = false) {
        $error = array();
        if ($blockid != false && is_numeric($blockid) && $blockid != "") {              global $_TABLES;
                if (DB_getItem( $_TABLES['blocks'], 'type', "bid = '{$blockid}'" ) == 'portal') {                                               $sql = "SELECT UNIX_TIMESTAMP(rdfupdated) as date, content, rdfurl FROM {$_TABLES['blocks']} WHERE bid = '" . $blockid . "'";
                        $result = DB_query( $sql );
                        $A = DB_fetchArray( $result );
                        if ( COM_rdfCheck($blockid, $A['rdfurl'], $A['date'] ))
                        {
                                $A['content'] = DB_getItem( $_TABLES['blocks'], 'content',
                                                        "bid = '{$blockid}'" );
                        }                       $return = $A['content'];
                } else {
                        $error[] = 'Block is not of Portal Type';
                }
        } else {
                $error[] = 'Is not a valid BlockID';
        }       if (count($error) > 0) {
                $return = "Something is wrong with the blockid that you entered.  Fix this.  Otherwise there could be issues";
                $return .= '<ul>';
                for ( $x = 0; count($error) > $x; $x++ ) {
                        $return .= '<li>' . $error[$x] . '</li>';
                }
                $return .= "</ul>";
        }
        return $return;
}

 

http://www.info-polonia.com/
 Quote

All times are EST. The time is now 01:20 pm.

  • 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