Question

Does apache asp module support functions ? why this doesn't work ?

<html>
<body>
<%
Function ftest(num)
    ftest = num * num
End Function

Response.Write(ftest(7))

%>
</body>
</html>

I got an internal server error. I've been able to run asp code that don't uses functions.

Server error:

[Fri Mar 21 17:45:48 2014] [error] [asp] [1789] [debug] Bareword found where operator expected at /home/**************/teste.asp line 5, near ") <--> \tftest" <--> 
[Fri Mar 21 17:45:48 2014] [error] [asp] [1789] [debug] \t(Missing operator before ftest?) <--> 
[Fri Mar 21 17:45:48 2014] [error] [asp] [1789] [error] error compiling teste.asp: syntax error at /home/**************/este.asp line 5, near ") <--> \tftest " <--> , /usr/local/share/perl/5.10.1/Apache/ASP.pm line 1466
[Fri Mar 21 17:45:48 2014] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 613 to 377 : URL /**********/teste.asp
Was it helpful?

Solution

As @John said:

"The Apache ASP module only supports Perlscript. If you want to use VBScript - which most people use with Classic ASP, then you really need Windows and IIS "

So I guess I'm out of luck. Thanks anyway, @John

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top