[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: Internal server error!
****** message to minivend-users from sparky@inetarena.com ******
Hello Hans,
I would suspect that the in your split routeens you are trying to split on
a space. That is a problem the way you are doing it. Perl expects a
special identifyer for spaces that identifyer is this
\s
so the split would look like this
my <list> = split(/\s/, $a, 2);
where list is a valid perl list structure of either type named array or
anon-arry ie
($a,$b,$c)=split(/\s/, $spliting_this, 2);
>From your example im not really able to see anymore of what you are trying
to do.
I know that ive had troubles with perls split function in the past and
have often found it easier to split into an anon-array.
another solution is to create a regex and capture the data that way
so you could do something like:
$a=~m/(regex of match one)|(regex of match two)|(regex of match three)/g
this would put (with perl) whatever matched in a set of parens into the
special variable $1, $2, $3 and so on depending on the number of paren
sets that your regex has. You can then re assign the variables to more
meaningful names in whatever natural language you find easiest to work in.
(i try to remember not everyone is a natural english speaker ;-))
Good luck
write me and let me know if it helped
sparky
sparky@inetarena.com
On Thu, 6 May 1999, Hans-Joachim Leidinger wrote:
> ****** message to minivend-users from "Hans-Joachim Leidinger" <hans-joachim.leidinger@home.gelsen-net.de> ******
>
> Hello list,
>
> i get an internal server error from apache 1.3.6 and have no clue why. I
> look into the error.log and find the message like below
>
> 195.145.169.236 Kwzw665n:195.145.169.236 - [06/May/1999:20:53:28 +0200]
> bol /cgi-bin/bol/process Runtime error: Bad sort routine:
> > sub {
> > my @a = (split /\ /, $a, 2)[];
> > my @b = (split /\ /, $b, 2)[];
> > my $r;
> > return 0
> > }
> >
> > syntax error at (eval 46) line 2, near "[]"
> > syntax error at (eval 46) line 3, near "[]"
> >
>
> I have check my code and i am not able to find my mistake or error! This
> is my code:
>
> the search.profiles:
>
> __NAME__ category
> mv_matchlimit=10
> mv_search_field=category
> mv_return_fields=0,author,title,price
> mv_case=yes
> mv_last=1
> __END__
>
>
> The part from srchform.html:
>
> <FORM ACTION="[process-target main]" METHOD=POST><INPUT TYPE=hidden
> NAME=mv_search_map VALUE="
> mv_searchspec=search12
> mv_searchspec=search14
> mv_searchspec=search1
> mv_searchspec=search13">
> <INPUT TYPE=hidden NAME=mv_search_field
> Value="products:author">
> <INPUT TYPE=hidden NAME=mv_search_field
> Value="products:title">
> <INPUT TYPE=hidden NAME=mv_search_field
> Value="products:code">
> <INPUT TYPE=hidden NAME=mv_search_field
> Value="products:verlag">
> <INPUT TYPE=hidden NAME=mv_coordinate
> VALUE=yes>
> <INPUT TYPE="hidden" NAME="mv_matchlimit"
> VALUE="10">
> <INPUT TYPE="hidden"
> NAME="create_last_search" VALUE="1">
> <TABLE VALIGN=TOP CELLSPACING=0 CELLPADDING=0 BORDER=0>
> <TR>
> <TD ALIGN=RIGHT><B>[L]Author[/L] :</B></TD>
> <TD> <INPUT NAME=search12 VALUE=""></TD>
> <TD ALIGN=CENTER VALIGN=BOTTOM ><B> [L]Sort order[/L]</B></TD>
> </TR>
> <TR>
> <TD ALIGN=RIGHT><B>[L]Title[/L] :</B></TD>
> <TD> <INPUT NAME=search14 VALUE=""></TD>
> <TD ALIGN=CENTER> <SELECT NAME="sort_field1">
> <OPTION VALUE="title">[L]Title[/L]
> <OPTION VALUE="author">[L]Author[/L]
> <OPTION VALUE="price:n">[L]Price[/L]
> <OPTION VALUE="title:r">[L]Reverse Title[/L]
> <OPTION VALUE="author:r">[L]Reverse Author[/L]
> <OPTION VALUE="price:nr">[L]Reverse Price[/L]
> <OPTION VALUE="">[L]none[/L]
> </SELECT>
> </TD>
> </TR>
> <TR>
> <TD ALIGN=RIGHT><B>[L]Code[/L] :</B></TD>
> <TD> <INPUT NAME=search1 VALUE=""></TD>
> <TD ALIGN=CENTER> <SELECT NAME="sort_field2">
> <OPTION VALUE="">[L]none[/L]
> <OPTION VALUE="author">[L]Author[/L]
> <OPTION VALUE="price:n">[L]Price[/L]
> <OPTION VALUE="title">[L]Title[/L]
> <OPTION VALUE="author:r">[L]Reverse Author[/L]
> <OPTION VALUE="price:rn">[L]Reverse Price[/L]
> <OPTION VALUE="title:r">[L]Reverse Title[/L]
> </SELECT>
> </TD>
> </TR>
> <TR>
> <TD ALIGN=RIGHT><B>[L]Verlag[/L] :</B></TD>
> <TD> <INPUT NAME=search13 VALUE=""></TD>
> <TD ALIGN=CENTER> <SELECT NAME="sort_field3">
> <OPTION VALUE="">[L]none[/L]
> <OPTION VALUE="price:n">[L]Price[/L]
> <OPTION VALUE="title:">[L]Title[/L]
> <OPTION VALUE="author:">[L]Author[/L]
> <OPTION VALUE="price:nr">[L]Reverse Price[/L]
> <OPTION VALUE="title:r">[L]Reverse Title[/L]
> <OPTION VALUE="author:r">[L]Reverse Author[/L]
> </SELECT>
> </TD>
> </TR>
> <INPUT TYPE=hidden NAME=mv_sort_field
> VALUE="[value sort_field1]">
> <TR>
> <TD><B> [L]Price[/L]</B><INPUT TYPE="hidden"
> NAME="mv_range_look" VALUE="price"></TD>
> </TR>
> <TR>
> <TD><B> [L]Low[/L] </B></TD>
> <TD><B> [L]High[/L] </B></TD>
> </TR>
> <TR>
> <TD>
> <SELECT NAME="mv_range_min">
> <OPTION value=0 SELECTED>[L]Any[/L]
> <OPTION value=10>[currency convert=1]10[/currency]
> <OPTION value=50>[currency convert=1]50[/currency]
> <OPTION value=100>[currency convert=1]100[/currency]
> <OPTION value=200>[currency convert=1]200[/currency]
> <OPTION value=500>[currency convert=1]500[/currency]
> <OPTION value=600>[currency convert=1]600[/currency]
> <OPTION value=800>[currency convert=1]800[/currency]
> </SELECT>
> </TD>
> <TD>
> <SELECT NAME="mv_range_max">
> <OPTION value=0 SELECT>[L]No object[/L]
> <OPTION value=20>[currency convert=1]20[/currency]
> <OPTION value=100>[currency convert=1]100[/currency]
> <OPTION value=200>[currency convert=1]200[/currency]
> <OPTION value=500>[currency convert=1]500[/currency]
> <OPTION value=600>[currency convert=1]600[/currency]
> <OPTION value=800>[currency convert=1]800[/currency]
> <OPTION value=1000>[currency convert=1]1000[/currency]
> </SELECT>
> </TD>
> </TR>
> <TR>
> <TD><INPUT TYPE="hidden" NAME="mv_first_match" VALUE=""></TD>
> <TD><INPUT TYPE="hidden" NAME="mv_doit" VALUE="search"><INPUT
> TYPE=image SRC="icon/[L]Search[/L].gif" BORDER=0
> NAME="[L]Search[/L]"></TD>
> </TR>
> <TR>
> <TD><INPUT TYPE="radio" NAME="mv_orsearch" VALUE="no" [checked
> name=mv_orsearch value=no default=1]> [L]Must match
> all[/L]</TD>
> </TR>
> <TR>
> <TD><INPUT TYPE="radio" NAME="mv_orsearch"
> VALUE="yes"> [L]Match any[/L]</TD>
> </TR>
> <TR>
> <TD><INPUT TYPE="hidden" NAME="mv_searchtype" VALUE="glimpse">
> <INPUT TYPE="checkbox" NAME="mv_case"
> VALUE="yes"> [L]Case sensitive[/L]
> </TD>
> </TR>
> <TR>
> <TD><INPUT TYPE="checkbox" NAME="mv_substring_match"
> VALUE="yes"[checked name=mv_substring_match value=yes default=1]
> > [L]Match substrings[/L]</TD>
> </TR>
> </TABLE>
> </FORM>
>
>
> What is the error? Any hints?
>
> FreeBSD 3.1-STABLE
> Apache 1.3.6
> Minivend 3.12
>
> Thank a lot for helping me!
>
> Joachim
>
> --------------------------
>
> Hallo Leser,
>
> ich bekomme ein "Internal server error"! Im error.log Datei finde ich
> ein Hinweis auf Syntax-Fehler bei Sorting! Ich komme aber nicht darauf,
> wo ich im srchform.html und im search.profiles was falsch gemacht habe!
> Bitte schaue die Code oben im englischen (verd***t ist das immer noch
> nicht richtig zu beherrschen) Teil an und sage mir, wo der Fehler ist!
>
> Einen Riesendank für die Hilfe!
>
> Joachim
>
> -
> To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list
>
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list