Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.10.01 - All Issues
Author Message
Doulos
Life Cycles Becoming CPU Cycles



Joined: Jun 06, 2005
Posts: 732

PostPosted: Mon Feb 04, 2008 11:41 am Reply with quote

Hello, I just today started getting this message when trying to access the Forums Admin......
Quote:
Internal Server Error

Referred From : [ Only registered users can see links on this board! Get registered or login! ]
Your IP : xx.xx.xxx.xxx
The Page Requested: /modules/Forums/admin/index.php
Agent : Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
Redirect Status : 500
I can access all other aspects of the admin menu, except forums admin.

This just started happening yesterday after I had the server operator restore the modules folder from a backup made the day before. Any ideas?

Update:
I am thinking it is a permissions problem, because I just renamed the modules folder and replaced it with the one I just replaced yesterday (if you follow me) and I CAN access the forums admin.

Update2:
Permissions look the same. Don't have a clue.


Last edited by Doulos on Mon Feb 11, 2008 1:19 pm; edited 1 time in total 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Mon Feb 04, 2008 7:46 pm Reply with quote

Are you sure the entire folder was properly restored? Can you compare the restored modules/Forums directory to the working modules/Forums directory?

Not sure what's causing the redirect - do you have the force URL on in NukeSentinel? Or, it may be something in .htaccess (you might try renaming your root .htaccess and / or your modules/Forums/admin/.htaccess (if you have one).

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
Doulos







PostPosted: Mon Feb 04, 2008 8:32 pm Reply with quote

1. I tried re-uploading all the admin files - from a backup I had from a week ago, and also from the RN2.10 distro. Still didn't work. I was in the process of uploading another complete copy of the forums modules when I thought of just renaming the backup from yesterday (which worked), so I never tried the new forums module folder.

After searching the forums, here, I tried the .htaccess thing, but it did no good.

Since I have limited knowledge when it comes to this stuff, the real important thing is - it works again. So, while I would like to understand what went wrong, I am content.
 
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Tue Feb 05, 2008 5:58 am Reply with quote

Sure sounds like a corrupted file somewhere. Glad you are back up and running fine.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
Doulos







PostPosted: Sat Feb 09, 2008 3:57 pm Reply with quote

This may or may not be related to the file restore issue.

I just noticed that the "Programmed Articles" and "Last 20 Articles" areas are no longer visible on the admin page. This makes it difficult to edit or delete these articles, as I must go into the database to do it.

I tried uploading (and overwriting) the files in these folders, but it did not help:
    1. admin folder
    2. News module folder


Any ideas?
 
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Sat Feb 09, 2008 8:28 pm Reply with quote

Could your tables be corrupted too? The admin program just pulls the last 20 articles from the database so if it can't find them, it can't display them.

And it just occurred to me ... it is admin.php which is in your root folder that pulls the 20 articles and the automated news. So re-uploading the admin folder will not replace a corrupted admin.php file ... you may need to do that too. In fact, I'd replace your entire root folder from the distribution except for config.php and rnconfig.php and htaccess.
 
View user's profile Send private message Visit poster's website
Doulos







PostPosted: Sat Feb 09, 2008 11:56 pm Reply with quote

Thanks, I will give that a try, but none of those files were restored. I don't think it is the database, if it were the database, wouldn't it just show that there were no articles? Also, the stories DO show up on the homepage. The field where the last 20 articles are displayed is not even there.
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sun Feb 10, 2008 12:46 am Reply with quote

A 500 error will not have anything to do with a corrupted file or table, per se. Usually, when a referral causes a 500 error it's because a header directive has been given w/o using an absolute url. While you can sometimes get away with using a relative URL, according to the HTTP specification, you should really use an absolute URL. Now as to what might have changed in your setup I can't say. But, this is easy enough to check out. Just modify the code that is calling the page that causes the error and make it an absolute url.

Instead of showing
The Page Requested: /modules/Forums/admin/index.php

It should show
The Page Requested: [ Only registered users can see links on this board! Get registered or login! ]

Another possible, although not probable in this case, is making the mistake of not adding an exit(); statement after a header(); statement. In almost every case you should make sure to use the exit(); statement, even if the logic doesn't seem to need it. Better safe than sorry Wink
 
View user's profile Send private message
Doulos







PostPosted: Mon Feb 11, 2008 1:24 pm Reply with quote

I installed a fresh copy of RN2.10, wrote a news story, checked and the 'Last 20" field is visible in the admin section.

Then I emptied all the tables from the db, imported the db from clanfga.com and checked the admin page..... NO Last 20 Stories listed.

I would really like to get this figured out before I upgrade to RN2.2

I assume one or more of my db tables are corrupted. Any idea where I should start looking?
 
fkelly







PostPosted: Mon Feb 11, 2008 2:12 pm Reply with quote

Well here is the PHP code that generates the list (this is from 2.20 but 2.10 will be very similar if not identical:

Code:
$result6 = $db->sql_query('SELECT sid, aid, title, time, topic, informant, alanguage, topicname FROM '.$prefix.'_stories left join ' .$prefix.'_topics ON topicid=topic '. $queryalang.' ORDER BY time DESC LIMIT 0,20')


So you are going mainly after your _stories table. You could replicate this SQL in PHPmyadmin using your prefix (probably "nuke"). Don't worry about the topics table for diagnosing this.

If you bring the table up in PHPmyadmin in browse mode you can see if the proper fields are in it. As long as the table has data you should be okay. This code is from admin.php which is in your nuke root directory. I forget exactly what you've done so far but I would reload this file from the distribution just to make sure it is the right one.

I just checked and the code from 2.10 was:

Code:
    $result6 = $db->sql_query('SELECT sid, aid, title, time, topic, informant, alanguage FROM '.$prefix.'_stories '.$queryalang.' ORDER BY time DESC LIMIT 0,20'); 


We added the join in 2.20 to reduce SQL calls. Using the 2.10 code makes your job of diagnosing the problem even simpler. I am wondering if you might have a table that's not up to snuff (has a missing field for instance) and be generating a SQL error behind the scenes, so you are not retrieving any data. You can check you table structure looking at what's in PHPmyadmin versus what is in the /INSTALLATION/SQL directory for 2.10.
 
Doulos







PostPosted: Mon Feb 11, 2008 2:43 pm Reply with quote

This is from my admin.php
Quote:
$result6 = $db->sql_query('SELECT sid, aid, title, time, topic, informant, alanguage FROM '.$prefix.'_stories '.$queryalang.' ORDER BY time DESC LIMIT 0,20');


I will begin going through the db tables as I find time.

Thanks for the help.
 
Doulos







PostPosted: Mon Feb 11, 2008 3:16 pm Reply with quote

Stories tables are identical with fresh db install of RN2.10 and no MYSQL errors are being reported.


Last edited by Doulos on Mon Feb 11, 2008 3:23 pm; edited 1 time in total 
Raven







PostPosted: Mon Feb 11, 2008 3:21 pm Reply with quote

Have you run the sql through phpMyAdmin as Frank suggested?
 
Doulos







PostPosted: Mon Feb 11, 2008 3:29 pm Reply with quote

Yes, only the stories table, though - if you mean did I check my tables in phpmyadmin with the ones in the INSTALLATION/SQL. All the fields and particluars are identical.
 
fkelly







PostPosted: Mon Feb 11, 2008 10:33 pm Reply with quote

Unfortunately, at least up until 2.20 Nuke does not generally report SQL errors. They can happen in the background and you will never know except that results won't match what you expect.

But I'm looking now at that $queryalang and it looks strange to me. I think that the logic is supposed to be that if the admin has a language selected in the authors table then only find stories with that language in the alanguage field. But it doesn't look right to me ... either in 2.10 or 2.20. Nevertheless, try this, go into edit admins and make sure that there is no language set for your admin. Then it should retrieve all stories because the value of $queryalang will be null. I think the SQL should have something like 'WHERE alanguage = '.$queryalang' but at this point that's a 2.30 issue.

Just don't set any languages on admins or unset any you have set and let us know.
 
montego







PostPosted: Wed Feb 13, 2008 6:43 am Reply with quote

Yeah, to be honest, not sure I would ever want an admin to have a language "restriction" on content. Definitely odd. Most of us, including admins, have regular user id's too that we can use to test out different languages and how the site looks content-wise...
 
fkelly







PostPosted: Wed Feb 13, 2008 1:18 pm Reply with quote

I checked and $queryalang is okay. We put the "WHERE" into it when there is an administrator's language present so the SQL should be okay.

I really believe that your stories table probably has languages in it in the alanguage field and that is causing the WHERE clause to return an empty result set. Either change the stories table or preferably eliminate the language setting from the authors table using edit admins and see if that makes the problem go away.
 
Doulos







PostPosted: Wed Apr 23, 2008 5:09 am Reply with quote

Update, finally. I finished going through all the db tables. Unfortunately, it was taking too much time so I quit checking after each table repair to see if it was the one causing my problems (my bumbling around in the db seems to have caused a lot of errors). Bottom line is, with db fixed I now can see the last 20 stories again on the admin page.
 
montego







PostPosted: Wed Apr 23, 2008 7:21 am Reply with quote

Excellent!
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.10.01 - All Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©