I am trying to write a simple Perl program (run_analog.pl) to invoke analog
with different command line parameters based on the links selected from a
list on an HTML page generated by the program. The gist of the program is
this:
if ($SiteNo eq "")
{
&SiteSelection;
}
else
{
print `/usr/bin/analog +g/home/vhost/logs/access_log +Ostdout`;
}
vhost in the above line would be a home directory selection through the
HTML page created by &SiteSelection, which creates (among other things) a
list like this:
<li><a href="/cgi-bin/run_analog.pl?SiteNo=1">Site One</a></li>
<li><a href="/cgi-bin/run_analog.pl?SiteNo=2">Site Two</a></li>
and so on.
If I run this script from the command line, supplying arguments as needed,
it does what I want it to do, most significantly, it runs analog. Yet if I
run it from a Web browser, it only creates the selection page, but causes a
500 error when I actually select a link from the list. I have replaced the
vhost in the back-ticked command line with the name of an actual home
directory for testing purposes, so the value of $SiteNo is really of no
importance (just <> 0).
I can run the anlgform.pl script without problems. If I run analog purely
from the command line, I can see the results page on my Web browser
correctly. I have also replaced the invocation of analog with something
like print `/bin/date`; (surrounding it with the appropriate HTTP header
and other HTML), and can see the date output on my browser. I have looked
at the anlgform.pl program, but can't see what I need to do (other than use
a pipe, which I don't want to do).
The system I am running on is:
Pentium with 128 MB RAM
RedHat Linux v6.1
analog v4.16 installed from an RPM
I'm probably just missing a minor thing, but can't find it. Any help would
be greatly appreciated.
TIA
Carsten Gehrke
========================================================================
Carsten P. Gehrke
mailto:[EMAIL PROTECTED]
========================================================================
+------------------------------------------------------------------------
| This is the analog-help mailing list. To unsubscribe from this
| mailing list, go to
| http://lists.isite.net/listgate/analog-help/unsubscribe.html
|
| List archives are available at
| http://www.mail-archive.com/[email protected]/
| http://lists.isite.net/listgate/analog-help/archives/
| http://www.tallylist.com/archives/index.cfm/mlist.7
+------------------------------------------------------------------------