Help - Search - Members - Calendar
Full Version: mt-search & cgiwrap
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
guillebe
mt-search.cgi isn´t working here (v2.51).

CODE
The server encountered an internal error or misconfiguration and was unable to complete your request.


on the Apache error log you can see this:

CODE
[Fri Jan 24 11:34:36 2003] [error] [client x.x.x.x] malformed header from script. Bad header=Use of uninitialized value at : /usr/cgiwrap/cgiwrap


so it seems cgiwrap related. Everything else is working perfectly.

I have the cgriwrapd debug dump available on request.
it shows this errors:

CODE
Use of uninitialized value at /usr/lib/perl5/5.00503/i386-linux/DB_File.pm line 256.
Use of uninitialized value at /usr/lib/perl5/5.00503/i386-linux/DB_File.pm line 256.
MT::App::Search=HASH(0x821efa0) Use of uninitialized value at /home/sites/site2/web/cgi-bin/lib/MT/Template/Context.pm line 381.
MT::App::Search=HASH(0x821efa0) Use of uninitialized value at /home/sites/site2/web/cgi-bin/lib/MT/Template/Context.pm line 381.
MT::App::Search=HASH(0x821efa0) Use of uninitialized value at /home/sites/site2/web/cgi-bin/lib/MT/Template/Context.pm line 381.


In case it helps, this is a Sun Cobalt RAQ 4.

regards,
Guille
guillebe
push
girlie
Here's the section of code from Context.pm:

CODE
sub _hdlr_blog_url {
   my $url = $_[0]->stash('blog')->site_url;
   $url .= '/' unless $url =~ m!/$!;
   $url;
}


The third line is number 381.

Do you have any blogs in your system where the Local Site URL field is empty?
guillebe
you were right on with line 381, there was a "ghost" blog in mi mt_blog table.
and looking at the other error, I realized it's a DB_File error, when I'm using MYSQL.

Is there anything I have to modify to make mt-search.cgi work with mysql?
faf
nothing at all. mt-search will work with whichever database you're using
guillebe
My doubt was because a thread I remember reading some time ago.

Anyway, I couldn't get it to work, and the errors that keep appearing are

CODE
Use of uninitialized value at /usr/lib/perl5/5.00503/i386-linux/DB_File.pm line 256.
Use of uninitialized value at /usr/lib/perl5/5.00503/i386-linux/DB_File.pm line 256.


Just to make sure, I made a fresh install on another dir of the same server. Search ain't working either. Same error.
guillebe
push
guillebe
the problem is with this block of code:
CODE
   ## Check whether IP address has searched in the last
   ## minute which is still progressing. If so, block it.
   if (eval { require DB_File; 1 }) {
       my $file = File::Spec->catfile($cfg->TempDir, 'mt-throttle.db');
       my $DB = tie my %db, 'DB_File', $file;
       if ($DB) {
           my $ip = $app->remote_ip;
           if (my $time = $db{$ip}) {
               if ($time > time - 60) {   ## Within the last minute.
                   return $app->error($app->translate(
                       "You are currently performing a search. Please wait " .
                       "until your search is completed."));
               }
           }
           $db{$ip} = time;
           undef $DB;
           untie %db;
           $app->{__have_throttle} = 1;
       }


where I understand MT creates a DB_File database with the IP of last users that made the last searches, in an effort to prevent abuse.

That "If ($DB)" is failing here, /tmp/mt-throttle.db is not being created.

anyone, ideas?
skolgen
push
skolgen
Why does searching work with mt.cgi (for admins) and not with mt-search.cgi (for regular users) on a cobalt raq4?

Tell me what I have to do that can help someone to solve this issue... I'm prepared to pay, to fall on my knees, whatever...
girlie
The internal search engine is different from mt-search.cgi.

Have you considered commenting out the throttle code to see if that clears up the error?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.