Perl Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPerl Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 18th, 2000, 03:49 PM
maphu maphu is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 0 maphu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I am trying to run a perl script, and when I try to load it in my webbrowser, I get this error:

Internal Server Error

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

I also tryed to run the debugger:

perl -c index.pl

The results were:

/<(?:[^>'"]*|(['"]).*?1)*>/: regexp *+ operand could be empty at index.pl line 100.

Line 100 of my script looks like this:

$sbody =~ s/<(?:[^>'"]*|(['"]).*?1)*>//gs;

This comes from this section of the script:

# Basic Modules

$http = Http->new();
$http->add($http->content_type("text/html"));
$content = Content->new();
$macro = Macro->new();
$style = Style->new();
$user = User->new();
$settings = Settings->new();
$settings->readsettings();
$sitemap = Sitemap->new();
$search= Content->new();
$stats = Stats->new();
$image = Image->new();
$article = Article->new();
$button = Button->new();
$link = Link->new();
$user = User->new();

$file = File->new();

if ($FORM{page} eq "") { $FORM{page} = $settings->main; }
$content->file($FORM{page});

@pairs = split(/ /,$http->getcookie);
foreach $pair (@pairs)
{ ($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$COOKIE{$name} = $value;
}
if ($content->access ne $COOKIE{GROUP} && $content->access ne "")
{ $content->file("login"); }
$http->add($http->pragma);
print $http->header;
if ($content->style ne undef)
{ $style->file($content->style); }
if ($content->macro ne undef)
{ $macro->file($content->macro); }

$FORM{query} =~ s/^s+//g;
$FORM{query} =~ s/s+$//g;
$FORM{query}= "Q$FORM{query}";
if ($FORM{query} ne "" && length($FORM{query}) >= 3 )
{ @FILES = $content->list;
foreach $file (@FILES)
{ $search->file($file);
if ($search->access eq $COOKIE{GROUP} | | $search->access eq "")
{ if ($search->keywords =~ /$FORM{query}/i)
{ $sbody = "";
foreach $t($search->body) { $sbody .= $t; }
$sbody =~ s/<(?:[^>'"]*|(['"]).*?1)*>//gs;
$sbody =~ s/t//g;
$sbody = substr($sbody,0,250);
$sbody .= "...";
push(@Results, sprintf ("<LI><A HREF="index.pl?page=$file">%s</A>n<BR><FONT SIZE="1">$sbody</FONT>",$search->title)); }
}
}
if (@Results == 0 && length($FORM{query}) >= 3) { push(@Results,"No Results !"); }
}
if(length($FORM{query}) < 3) { push(@Results,"Query too short !"); }

Reply With Quote
  #2  
Old October 29th, 2000, 09:56 AM
pablissimo pablissimo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 17 pablissimo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Try running it through perl -w for a bit more info

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPerl Programming > Perl Internal Server Errors


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT