Premessa: chiedo qui e non in asp perchè immagino che nessuno li usi linux.
Ho installato Apache::ASP su una debian con apache2, eseguendo uno script abbastanza stupido e molto datato, il webserver restituisce un errore 500 e nei log trovo un sacco di errori di sintassi nei log di apache, dato che lo script ha girato su un server windows fino a ieri, escluderei errori grossolani nel codice.
Qualcuno sa dirmi cosa devo cambiare; tenete presente che lo script non l'ho fatto io quindi ne so quanto voi
ecco il codice:
codice:
<html>
<head>
<title> </title>
</head>
<body bgcolor="#FFFFFF" text="#000088" link="#000088" vlink="#000088" alink="#000088">
<form method="get" name="Formmotore" action="motore.asp" onSubmit="return ControllaForm();">
<div align="center"> <font color="#000088">
<input type="TEXT" name="CosaCerco" size="50">
<input name="cas" type="submit" value="Cerca ">
</font></div>
<table cellpadding="0" cellspacing="0" align="center">
<tr>
<td valign="top" align="center"> <font color="#000088">
<input type="radio" name="TipoDiRicerca" value="AlmenoUnaParola">
Almeno una parola
<input type="radio" name="TipoDiRicerca" value="TutteLeParole" checked>
Tutte le parole
<input type="radio" name="TipoDiRicerca" value="FraseIntera">
Frase intera</font></td>
</tr>
</table>
</form>
<table width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#000088" align="center">
<tr>
<td height="18" bgcolor="#000088" bordercolor="#000088"><font color="#FFFFFF">
Ricerca effettuata nel sito per </font><font color="#000088"><font color="#FFFFFF">
<%dim Titolo
dim dit
dim dite
dim intPosSav
dim intPosSave
dit = Trim(Request.QueryString("dir"))
dit = replace(dit, "%20", " ")
dite=dit
Set file1 = CreateObject("Scripting.FileSystemObject")
if dite="" then
Set file2 = file1.GetFolder(server.mappath("/botta"))
else
Set file2 = file1.GetFolder(server.mappath(dite))
end if
Set file3 = file2.Files
response.write "<base target= ""mainframe"" >"
response.write "<body link=""#000088"" bg"
response.write "color=""#FFFFFF"" vli"
response.write "nk=""#990099"">"
dit = replace(dit, "@5807454743", "")
dit=replace(dit,"\","/")
dim intPos
intPos = 1
Do
titol= Trim(Mid(dit, intPosSave + 1))
intPos = InStr(intPos, dit, "/")
If intPos = 0 Then
Exit Do
Else
intPosSave = intPosSav
intPos = intPos + 1
intPosSav = intPos - 1
End If
Loop
titol=replace(titol,"/","")
response.write "" & titol & "" %>
</font></font></td>
</tr>
</table>
<font color="#000088">
<%
response.write "
<div align= ""center"" >" & "<font size= ""3"" ><font color= ""#000088"" >" & titol & "</font></font>
</div>"
dit=replace(dit,"/","",1,2)
For Each file in file3
titolo=replace(file.name,".htm","")
titolo=replace(titolo,".HTM","")
titolo=replace(titolo,".html","")
if titolo = "nulla.txt" then
response.write "
<div align= ""center"" >" & "<font size= ""5"" > " & "" & "Materiali non presenti" & "
</div>" & "
<div align= ""center"" >[img][/img]</p></div>"
else
Set StreamTesto = File.OpenAsTextStream
ContenutoDelFile = StreamTesto.ReadAll
if ContenutoDelFile= "" then
else
totalefilecercati=totalefilecercati + 1
response.write "
" & ContenutoDelFile & "
"
end if
end if
Next
for each subfolders in file2.subfolders
Set file2 = file1.GetFolder(server.mappath(dite & subfolders.name))
Set file3 = file2.Files
catt=replace(subfolders.name,"/","")
catt = replace(catt, "@5807454743", "")
if catt=cat then
else
direds = replace(subfolders.name, "", "130;")
response.write "
<div align= ""center"" >" & "" & "--" & catt & " (Visualizza tutti i titoli)" & "</div>"
cat=catt
end if
For Each file in file3
Set StreamTesto = file.OpenAsTextStream
ContenutoDelFile = StreamTesto.ReadAll
if ContenutoDelFile="" then
else
totalefilecercati=totalefilecercati + 1
response.write "
" & ContenutoDelFile & "
"
end if
Next
next
%>
</font>
<table width="100%" border="0" cellspacing="1" cellpadding="1" bgcolor="#000088" align="center">
<tr>
<td height="18" bgcolor="#000088" bordercolor="#000088"><font color="#000088">
<font color="#FFFFFF">La ricerca �stata effettuata in
<% = TotaleFileCercati %>
documenti.</font></font></td>
<td height="18" bgcolor="#000088" bordercolor="#000088"><font color="#000088"><a href="http://www.freeasphost.co.uk/defcon/" target="_blank">Davide
Vogliotti</a></font></td>
</tr>
</table>
</body>
</html>