Gossamer Forum
Home : Products : Links 2.0 : Installation -- Unix :

"Server encountered etc" on build

Quote Reply
"Server encountered etc" on build
I have recently transferred all files to a new server.
I did this by downloading all files from old server and then uploading all files to new server through ftp.

Have changed all paths and set permissions.

Everything works fine...except building.

Links can be added, search can be done, and admin interface works in that you can validate. BUT when I try to build I get "The server encountered an internal error or misconfiguration and was unable to complete your request."

I have checked everything but to no avail.

Any ideas pleeeeeeeease?

Thanks

Quote Reply
Re: "Server encountered etc" on build In reply to
Did you also change the Perl path in ALL your .cgi files? I betcha that the new server has a different Perl path.

Regards,

Eliot Lee
Quote Reply
Re: "Server encountered etc" on build In reply to
Thanks, but yes, I did change the path to perl and have doublechecked all cgis. Also reloaded all in ASCII again just to be sure.

What is strange is that *everything* else works ok.

Does this point to an error in one particular place?
Apart from modifying paths and resetting permissions I have not changed anything.



Quote Reply
Re: "Server encountered etc" on build In reply to
Thanks, but yes, I did change the path to perl and have doublechecked all cgis. Also reloaded all in ASCII again just to be sure.

What is strange is that *everything* else works ok.

Does this point to an error in one particular place?
Apart from modifying paths and resetting permissions I have not changed anything.

Thanks again.



Quote Reply
Re: "Server encountered etc" on build In reply to
Probably you did NOT change the paths correctly for the $db_script_path and $build_root_path in the links.cfg file.

Why two duplicate posts? Wink

Regards,

Eliot Lee
Quote Reply
Re: "Server encountered etc" on build In reply to
Thanks, but I did, honest!

I subsequently renamed the directory where pages are built from "search" to "searchOLD" (to in effect delete/hide it). This was full of pages and subdirectories I had ftpd, apparently unnecessarily :)

I created a new directory "search".

Then on doing build again I got the same server error message but found that all the pages had in fact been rebuilt in "search". The newly validated entries show up. BUT nothing shows up under "New".

I guess this indicates that the problem is somewhere right at the end of the build routine???

Any ideas, please.

PS: don't know why 2 duplicate entries, I think I pressed stop to change something and then resubmitted.


Quote Reply
Re: "Server encountered etc" on build In reply to
Double check all the permissions of your directories in the search directory. Make sure that the following directories are set to 777 (drwxrwxrwx):

a) search
b) New
c) Cool
d) Ratings
e) Detailed

Regards,

Eliot Lee
Quote Reply
Re: "Server encountered etc" on build In reply to
Thank you Eliot, I double checked and everything is 777. In any case the whole of the new Search directory was rebuilt by the system so presumambly it would have set all permissions correctly.

Everything else is working well with these exceptions:

I validated another link and marked it as new with 11 votes (works fine).

Then I did build all. Server error message came up BUT on searching doing a search I found that the new link had been entered and appeared under Top-Rated BUT did not appear under New. Permission for New is definitely 777. The New links page appears but shows no links.

So in a nutshell the problem is that:
- everything is built EXCEPT New
- the server returns the same error message (makes no difference if I do build staggered or auto)

Bizarre!??? But maybe we're getting closer...



Quote Reply
Re: "Server encountered etc" on build In reply to
You cannot MANUALLY set the isNew field...it will check the $db_new_cutoff variable and mark it as New automatically....

Since you are having problems with the New pages...HAVE you hacked ANY of the Date routines or neglected to keep the same format of the Date field in your off-line database editor as the format defined in the sub get_date routine???

Regards,

Eliot Lee
Quote Reply
Re: "Server encountered etc" on build In reply to
I had not changed anything about the date but I began to wonder if that was the problem. I changed the 1900 in sub long_date links.cfg to 2000 but it makes no difference.
(Incidentally is this a good or bad idea anyway? I'll change it back to 1900 if necessary.)

I think you must be right that the problem is somewhere with the date. But all the dates shown against each entry, including recently validated ones are ok.

I have not touched the sub get_date at all. Here it is:

sub get_date {
# --------------------------------------------------------
# Returns the current date.
#
my ($time) = shift;
$time ||= time();

exists $DATE_CACHE{$time} or ($DATE_CACHE{$time} = &unix_to_date($time));
return $DATE_CACHE{$time};
}

Since this is a new server (Cobalt RAQ3), is it possible that I need to change something? What do you mean by my off-line database editor?

Thanks again.

Regards,

Jo

PS: when do you guys sleep. It's afternoon here in Bangkok so it must be night-time with you??? :)

Quote Reply
Re: "Server encountered etc" on build In reply to
Off-line editor (like MS Access, Excel, EditPlus, etc.)...I thought you might be editing links off-line and I have seen some Links users have problems with uploading files to their server after editing them the links.db file in a spreadsheet program because they did not align the date formats!

For the date routines...you should NOT change 1900 to 2000. The script is Y2K compliant!

I would check with your hosting company to make sure that they have all recent Perl modules, including Local.pm, uploaded to their servers.

Regards,

Eliot Lee
Quote Reply
Re: "Server encountered etc" on build In reply to
OK will do but I'm sure we have the latest perl.

I think the OS is not UNIX but LINUX:
"The Cobalt RaQ runs a port of Redhat Linux 5.1 with the 2.0.34 kernel, and some 5.2 optimizations."

Could that cause a problem?


Quote Reply
Re: "Server encountered etc" on build In reply to
Nope...the problem is most likely associated with the date. And this has nothing to do with your Platform or OS, but the Perl module (Local.pm) that controls the date format in Links.

Got it?

Regards,

Eliot Lee
Quote Reply
Re: "Server encountered etc" on build In reply to
yep.....I had the same problem with a Cobalt Raq.......the work around was to run nph-build.cgi through telnet.....


Quote Reply
Re: "Server encountered etc" on build In reply to
Really sorry to ask another question. I am checking about local.pm but since all other dates are ok, are you sure this could be the problem? Does it only affect New? And why, when I do a staggered build, don't I at least get the first one or two pages showing progress of build? I get nothing except server error and yet the whole build is done with the exception of New.

Regards
Jo

Quote Reply
Re: "Server encountered etc" on build In reply to
I found the following "HtmlLocale.pm" on the server. Is this the same as local.pm? Do I need to reconfigure something in Links for this?

The location on my server is /etc/mod_perl/Cobalt/HtmlLocale.pm

Thanks, Jo

============================================
# This is an apache perl module. Do not use directly.
# Copyright Cobalt Networks 1999.
#
# Author: Harris Vaegan-Lloyd <harris@cobaltnet.com>
#
# Any similarities between mod_perl and black magic are purely coincidental.
# No actual black magic practioners or covens are represented in this code.
#
package Cobalt::HtmlLocale;

use strict;
use Apache::File ();
use Apache::Constants qw(:common);
use Cobalt::Locale;
use Locale::gettext;
use CGI;

sub handler {
my $r = shift;
my $q = new CGI;
return DECLINED unless $r->content_type() eq 'text/html';
# Well, we were probably called as an error page,
# let's avoid returning an error again so that we don't get into
# a big loop over it.
if ( $r->prev && $r->prev->filename =~ m#^/usr/admserv/html/.cobalt/error/#o ) {
return OK;
}

my $locale=Cobalt::Locale->getByHTTPHeader( $ENV{ 'HTTP_ACCEPT_LANGUAGE' } );
if( $locale ) { $ENV{ 'LANGUAGE' }=$locale->getLocale(); }


my $file = $r->filename;

unless ( -e $file ) {
$r->log_error("File does not exist: $file");
return 404;
}

unless ( -r $file ) {
$r->log_error("File is not readable: $file");
return FORBIDDEN;
}

my $modtime = localtime( (stat $file) [9] );

my $fh;
unless ($fh = Apache::File->new($file)) {
$r->log_error("Couldn't open $file for reading: $!");
return FORBIDDEN;
}

if ( $q->param('status') ) {
$r->status($q->param('status'));
}

$r->send_http_header;

while (<$fh>) {
s/\[str.([^\]]+)\]/Locale::gettext::dgettext("ui", "$1")/geo;
$r->print($_);
}

return ( $q->param('status') || 0 )
}

1;
__END__


Quote Reply
Re: "Server encountered etc" on build In reply to
Nope...and since your new server is using mod_perl that is probably the problem since LINKS 2.0 is NOT written for mod_perl.

Good luck finding a solution!

Regards,

Eliot Lee