TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,965
  • Latest: boruko
Stats
  • Total Posts: 195,980
  • Total Topics: 21,320
  • Online today: 281
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 295
  • Total: 295

'Internal Server Error' with known cause

Started by Hier, September 13, 2007, 08:14:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hier

Hello. I'm unable to add php box to a block. I can add it from the settings and everything looks fine, but when I load the index.php page, I get "Internal Server Error". Thankfully, I had opened by admin cp in opera, and I tested it as a user in IE7 and Firefox. So, in my admin cp block manager, I deactivated the php box, and there was no error in loading the index page. I tried two more things

1) Changed the block position from left to center, but still got this error   
2) I created an article with the php script at http://www.tinyportal.net/index.php?topic=3320.0, and I made this article appear on a block, but I still got the internal server error.

Right now, I've deactivated this block, and portal is working fine. But I wanted to know if anybody has an idea why I'm getting this error, as I wanted to use the phpbox. Is it really a server error, as I get the error only using phpbox. Thanks

G6Cad

A php block yes, but whats the code USED in the block when you get the error ?

Hier

#2
I used the following code from this thread as mentioned in point 2) above. Thanks

$articles=db_query("SELECT id,subject,intro,author FROM tportal_articles WHERE approved=1 AND off=0 ORDER BY date DESC", __FILE__, __LINE__);
$cnt=0;
While ($row=mysql_fetch_row($articles)) {
   // The number of articles you want displayed
   if ($cnt < 3) {
    echo '<table cellspacing="0" cellpadding="0" width="100%" style="margin-top: 4px;
             margin-bottom: 4px;" border="0" class="tborder"><tr>';
    echo '<td width="100%"><div class="titlebg" style="padding: 6px;">
    <img src="http://www.mywebsite.com/SMF/Themes/default/images/TParticle.gif" alt="*" style="margin: 0px;" align="middle" />
    <a href="http://www.mywebsite.com/SMF/index.php?page=' . $row[0] . '"><b>' . $row[1] . '</b></a></div><div style="padding: 8px; padding-top: 0px;" class="windowbg2">
    <div style="padding-bottom: 4px; vertical-align: bottom;" class="smalltext"> By :
    <b>' . $row[3] . '</a></b></div>' . $row[2] . '<br></div>
    <div class="windowbg"style="padding: 6px;">
    <a href="http://www.mywebsite.com/SMF/index.php?page=' . $row[0] .'">Read more...</a></div></td>';
     echo '</tr></table>';
    }
   $cnt++;
}
If  ($cnt=0) {
    echo '<td>No Artcles to review.  Please submit articles.';
    }


G6Cad

Please remove the code from your post and repost it again using the code tags, the code dispplays wrong if you dont use codetags in posts

Hier

#4
Sorry. Edited my previous post

Edit : OK now. I just got a reply from my host saying that they had restarted mysql for some reason, and that could have caused the problem. Thanks for you time.

This website is proudly hosted on Crocweb Cloud Website Hosting.