[l2h] [Q] follow up query on running l2h as a cgi-bin program

Wed, 10 Jan 2001 09:44:17 EST

Thanks to the people who answered, saying that what I was trying was OK.
But, although I've got latex2html "working" using a different computer, running
under AIX, there is still a problem here which I can't understand.
Part of the problem seems to be permissions.
Forgive me, here comes the code (which I think is small enough not to annoy
#!/usr/local/bin/perl -w
use strict;
#$ENV{PATH} = "/usr/local:/download/latex2html:/usr/local/teTeX/bin";
open(STDERR, ">&STDOUT");
# this is l2h.pl a program to edit a latex file and latex2html it
# so that it can be viewed in another browser window.

use CGI;
my $query = new CGI;
use CGI::Carp qw(fatalsToBrowser);

print $query->header;
my $TITLE="Latex2HTML editor/viewer";

print $query->startform;

print $query->textarea(-name=>'l2h_text',-default=>
  LaTeX text here (example)
  \sum_{\ell=2}^{\ll=7}\int_0^\infty e^{-\alpha x^2} dx = ?
print "<br>";
print $query->submit(-name=>'l2h',-value=>'submit to l2h');
print $query->endform;
print $query->dump();
system("ls -al");
system("rm *.html");
system("ls -al");
if ($query->param('l2h_text') ne ''){
  my $l2h_text = $query->param('l2h_text');
  print "<br>l2h_text = $l2h_text";
  open (TEMP_FILE,">/u/cdavid/public_html/l2htemp.tex");
  print TEMP_FILE  $l2h_text;
  close TEMP_FILE;

  my $command = "/usr/local/latex2html98p1/latex2html";
  print "<br>executing (system) command: $command ";
    print "<br> problems with execution of $command";
  print "<br> returned from execution of latex2html command";

print $query->end_html;

The actual installed program can be seen at
(where it can be tried)
(*there is a tilde before cdavid, which doesn't print on this IBM mainframe).
Can someone see why I'm having trouble.
By the way, STDERR is ported to STDOUT so that one can see what is happening
during the spawning process.
Thanks in advance.
Carl David