I'm trying to get my script working via cgi instead of netcgi, and I now have:
#!/usr/bin/ocamlrun ocaml
#directory "/usr/lib/ocaml/3.08.3/cgi/";;
#load "cgi.cma";;
let () =
let params = Cgi.parse_args () in
Cgi.header "text/plain";
try
match int_of_string (List.assoc "foo" params) with
| 1 -> print_endline "Yes"
| _ -> print_endline "No"
with
| Not_found -> print_endline "'foo' not found"
| exn -> print_endline "Error parsing 'foo'";;
When I run it, I get:
root@inner-sanctum:~/public_html/ml# ./helloweb.ml
Reference to undefined global `Netmime'
What do I need to do next? If it's another package I need to install,
what's a name aptitude will recognize or else what's a URL I can
download from?
Thanks, and thanks to Jonathan for help,
--
++ Jonathan Hayward, jonathan.hayward@pobox.com
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com
** If you'd like a Google Mail (
gmail.com) account, please tell me!