Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
CGI wants Netmime
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jonathan Hayward <christos.jonathan.hayward@g...>
Subject: CGI wants Netmime
I'm trying to get my script working via cgi instead of netcgi, and I now

#!/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";
   match int_of_string (List.assoc "foo" params) with
   | 1 -> print_endline "Yes"
   | _ -> print_endline "No"
 | 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# ./
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,
** 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

** If you'd like a Google Mail ( account, please tell me!