From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 9E3DDBBAF for ; Fri, 14 Jul 2006 20:17:33 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k6EIHX8k022137 for ; Fri, 14 Jul 2006 20:17:33 +0200 Received: by ug-out-1314.google.com with SMTP id m2so854380uge for ; Fri, 14 Jul 2006 11:17:32 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=avom+QqGXkOyDdbPYc2jNpMLmKDEOVF0P9+yZS1URK6wcIDft1RjYcSWLta+9ejGxZNshH6XLOvyAeJO0e2/LQwNZgV5rGOPjXn2JtDs1GlGB0R+BI9iJT0tGpyrsgT3OPe3HchOnnJ6swP9OXMlvy3H9hrDk1EjSKGltCRogZc= Received: by 10.78.164.13 with SMTP id m13mr1824153hue; Fri, 14 Jul 2006 11:17:31 -0700 (PDT) Received: by 10.78.116.20 with HTTP; Fri, 14 Jul 2006 11:17:31 -0700 (PDT) Message-ID: Date: Fri, 14 Jul 2006 14:17:31 -0400 From: "Jonathan Hayward http://JonathansCorner.com" To: caml-list@yquem.inria.fr Subject: CGI wants Netmime MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_59424_32045901.1152901051563" X-j-chkmail-Score: MSGID : 44B7DFBD.000 on nez-perce : j-chkmail score : X : 0/20 1 X-Miltered: at nez-perce with ID 44B7DFBD.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; netcgi:01 usr:01 ocamlrun:01 ocaml:01 usr:01 lib:01 ocaml:01 3.08.3:01 params:01 foo:01 params:01 endline:01 endline:01 'foo':01 exn:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DNS_FROM_RFC_ABUSE,HTML_20_30, HTML_MESSAGE,RCVD_BY_IP autolearn=disabled version=3.0.3 ------=_Part_59424_32045901.1152901051563 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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! ------=_Part_59424_32045901.1152901051563 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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! ------=_Part_59424_32045901.1152901051563--