TinyPortal

Development => Support => Topic started by: Shadow on April 22, 2007, 11:07:02 PM

Title: Tiny Portal 98 is throw out errors
Post by: Shadow on April 22, 2007, 11:07:02 PM
Tp is throw out errors on my forum and I dont know why. I am getting these errors by members and guests. All these started on April 18, 2007, 02:39:23 AM.

Here the errors All the errors is on the same line too

http://www.shadowskingdom.com/index.php?page=12
Apply Filter: Only show the errors with the same message
8: Use of undefined constant r - assumed 'r'
File: /home/kingdom/public_html/Themes/default/TPortal.template.php (eval?)
Line: 41

Any idea?
Title: Re: Tiny Portal 98 is throw out errors
Post by: IchBin on April 22, 2007, 11:19:01 PM
Could be something in your page. Doesn't necessarily mean its a TinyPortal error. Does it only happen on that page?
Title: Re: Tiny Portal 98 is throw out errors
Post by: Crip on April 22, 2007, 11:38:35 PM
that is a menu link error....check all your links, one has a '' <-problem --> that should hve a ' , <-- fix.
Title: Re: Tiny Portal 98 is throw out errors
Post by: Shadow on April 23, 2007, 02:37:25 AM
@Ich -- Well, the error is on (TPortal.template.php (eval?) Line: 41)  I always thought if tp give errors its always be on one of the files in tp.  Or I thought wrong about this one....

@Crip -- That is the only page is giving out the errors.  And I am using a php Article with a rss feed code I get off of here.  And I have other Articles is on the forum but not php format. 

How can I tell if the link is wrong?  All the other links is correct far as I know they are

Edited --

Sorry, I dont know what to name the topic....
Title: Re: Tiny Portal 98 is throw out errors
Post by: IchBin on April 23, 2007, 02:41:27 AM
No, it does not mean that TP is the one throwing the errors just because of the file name. Often it happens when something you put in TP can't find something or has some other type of error. Does this error happen on any other page than page=12 ?
Title: Re: Tiny Portal 98 is throw out errors
Post by: Shadow on April 23, 2007, 02:49:43 AM
Thank you for clearing this up for me Ich  ;)

The last thing I put in TP is a rss code and I am using a php Article for that code too.

Well, I just found out some pages is giving out errors too.
http://www.shadowskingdom.com/index.php?page=11 
and page 12.

Both of the pages is using a rss feed code I get off of here.  And both of them is a php article
Title: Re: Tiny Portal 98 is throw out errors
Post by: IchBin on April 23, 2007, 03:16:19 AM
can you post the code please?
Title: Re: Tiny Portal 98 is throw out errors
Post by: Shadow on April 23, 2007, 03:19:09 AM
Sure thing, I can do for you Ich

I am using this code for both feeds

   // An RSS Reader to grab news from whichever site you choose
$backend = "http://www.smfoogle.com/rss.php?list=top&s=P&p=1"; //change this to match the rss feed url you wish to display.
// end


function endtheElement($parser, $tagName) {
// This function is used when an end-tag is encountered.
global $insideitem, $tag, $title, $description, $link;
 
  if ($tagName == "ITEM") {
    echo '<table width="100%" border="0"><tr>
      <td class="main-table">
      <span class="nav-head"><strong>
      ';
    printf("<p><b><a href='%s'>%s</a></b></p>", // make our title into an actual link
    trim($link),htmlspecialchars(trim($title))); // remove html characters from the title
 
    echo "</tr>";
    echo '<tr>
      <td class="nav">';
    printf("<p>%s</p>",$description); // Print out the live journal entry
    echo"</td>";
    echo "</tr>";
    echo "</table>";
    echo "<br>";
    $title = $description = $link = $insideitem = false;
   }
}

// Now to the parsing itself. Starts by creating it:

$xml_parser = xml_parser_create();

// Then setup the handlers:

xml_set_element_handler($xml_parser, "startElement", "endElement");
xml_set_character_data_handler($xml_parser, "characterData");

// Open the actual datafile:

$fp = fopen($backend, r);

// Run through it line by line and parse:

while ($data = fread($fp, 4096)) {
  xml_parse($xml_parser, $data, feof($fp))
    or die(sprintf("XML error: %s at line %d",
           xml_error_string(xml_get_error_code($xml_parser)),
           xml_get_current_line_number($xml_parser)));
}

// Close the datafile

fclose($fp);

// Free any memmory used

xml_parser_free($xml_parser);
Title: Re: Tiny Portal 98 is throw out errors
Post by: IchBin on April 23, 2007, 03:29:49 AM
Try chaning this line:

$fp = fopen($backend, r);

To this:

$fp = fopen($backend, "r");


See if that helps get rid of the error.
Title: Re: Tiny Portal 98 is throw out errors
Post by: Shadow on April 23, 2007, 03:40:20 AM
I think that solved the problem
Title: Re: Tiny Portal 98 is throw out errors
Post by: G6Cad on April 23, 2007, 07:56:57 AM
My TP husband is great, isent he  :-*  :-*
Title: Re: Tiny Portal 98 is throw out errors
Post by: Shadow on April 23, 2007, 04:11:54 PM
Yes, He is great  ;D
Title: Re: Tiny Portal 98 is throw out errors
Post by: Crip on April 23, 2007, 04:14:03 PM
my Boss is a problem solver, plus a good code monkey -- hehe :P
Title: Re: Tiny Portal 98 is throw out errors
Post by: Shadow on April 23, 2007, 04:24:05 PM
Yes, Its he a problem solver and I didnt know he is a code monkey heheheh :)
Title: Re: Tiny Portal 98 is throw out errors
Post by: G6Cad on April 23, 2007, 05:05:04 PM
No, he's not a codemonkey. hes MY codemonkey  ;)
Title: Re: Tiny Portal 98 is throw out errors
Post by: Shadow on April 23, 2007, 07:06:08 PM
Oh, Awesome, He can be my codemonkey lol J/K

Yes, yOu are correcr he is yours only codemonkey lol
Title: Re: Tiny Portal 98 is throw out errors
Post by: IchBin on April 24, 2007, 12:09:14 AM
lol, I needed this today G6. Thank you! Long day at work, then I come here and get a nice PM from a user that is mad at me for locking his thread... No rest for the weiry! :( Feels good to be someones code monkey. :D I think an avatar change is in order if I get a chance today.
Title: Re: Tiny Portal 98 is throw out errors
Post by: Shadow on April 24, 2007, 12:29:27 AM
Err, Thats suck about that pm Ich :(.  I know how that feels about that.  No rest for the EVIL at all. lol

Please change you avatar on here Ich ???

All of us care about you very much :)
Title: Re: Tiny Portal 98 is throw out errors
Post by: IchBin on April 24, 2007, 12:59:29 AM
Thank you Shadow. I appreciate your comments. Avatar is changed! Woohoo for the code monkey! :D
Title: Re: Tiny Portal 98 is throw out errors
Post by: Shadow on April 24, 2007, 01:28:07 AM
Your most welcome Ich  ;D

YAYAY, Ich have a new AVATAR on here  :D

Woohooo for the code money  ::)
Title: Re: Tiny Portal 98 is throw out errors
Post by: G6Cad on April 24, 2007, 08:52:38 AM
IchBin ?? Where HAVE YOU BEEN this long ??
Title: Re: Tiny Portal 98 is throw out errors
Post by: IchBin on April 25, 2007, 01:52:07 AM
We are so busy at work that my boss has put me out in the field to work. I don't have access to a computer during the day because of that. Originally he told me only for a few days. I don't know when I'll be back in the office at this point...
Title: Re: Tiny Portal 98 is throw out errors
Post by: Shadow on April 25, 2007, 01:58:05 AM
What type of work do you do Ich?
Title: Re: Tiny Portal 98 is throw out errors
Post by: IchBin on April 25, 2007, 02:02:35 AM
Normally, I'm a shop manager for my Uncles Commercial Painting business. For the next little bit I suppose I'm a painting foreman. <-- doesn't like it. :(
Title: Re: Tiny Portal 98 is throw out errors
Post by: Lord Anubis on April 25, 2007, 02:03:25 AM
Quote from: IchBinâ„¢ on April 25, 2007, 01:52:07 AM
We are so busy at work that my boss has put me out in the field to work. I don't have access to a computer during the day because of that. Originally he told me only for a few days. I don't know when I'll be back in the office at this point...

Are you by any chance an Engineer, I hate field work as well >:(
Title: Re: Tiny Portal 98 is throw out errors
Post by: Lord Anubis on April 25, 2007, 02:04:11 AM
lol posted at the same time....hehe
Title: Re: Tiny Portal 98 is throw out errors
Post by: Shadow on April 25, 2007, 02:07:00 AM
Sounds like a good paying job you have there :)  Errs thats suck about that.  I guess you hate painting then....
Title: Re: Tiny Portal 98 is throw out errors
Post by: Lord Anubis on April 25, 2007, 02:12:29 AM
I need a painter... for my house, and I know they get paid, because I have been price checking
Title: Re: Tiny Portal 98 is throw out errors
Post by: Shadow on April 25, 2007, 02:14:19 AM
Do they get paid good or not?
Title: Re: Tiny Portal 98 is throw out errors
Post by: IchBin on April 25, 2007, 02:14:35 AM
Well after 13 years of being in that field, I can tell you that we don't get rich off of it. :)
Title: Re: Tiny Portal 98 is throw out errors
Post by: Lord Anubis on April 25, 2007, 02:15:39 AM
very well and he is a foreman, he just inspects and watches to ensure they do a good job, might not get rich but it isn't as bad as some jobs...nice job Ichbin...I hate being an Electrical Engineer  :tickedoff:
Title: Re: Tiny Portal 98 is throw out errors
Post by: IchBin on April 25, 2007, 02:18:17 AM
Construction sucks period. Thats why I'm in school for computer programming. :)
Title: Re: Tiny Portal 98 is throw out errors
Post by: Shadow on April 25, 2007, 02:18:41 AM
Oh, I take that as a no you dont get paid much :(

You work that long for them wow....

Well, You sould get a new job then if you hate being a Electrical Engineer ...
Title: Re: Tiny Portal 98 is throw out errors
Post by: Lord Anubis on April 25, 2007, 02:24:24 AM
We are thrown off topic, 

No we get paid, it is just the hours and the stress we get...I am 26 and already growing grey hair...It isn't easy and got too many responsibilities looking after drafters and others...It does pay very well though