From rkleeman at neta.com Fri Feb 2 18:17:41 2001 From: rkleeman at neta.com (Bobby Kleemann) Date: Thu Aug 5 00:20:16 2004 Subject: Perl Mongers, Wed Feb 21 Message-ID: ~sdpm~ Just a quick reminder, the Perl Mongers Meeting for Feb will be Wed, the 21st at the normal location, Velocigen. Can someone who is responsible for the web page please update it. _ _ _ Bobby Kleemann http://www.neta.com/~rkleeman/ ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From nestor.florez at intel.com Mon Feb 5 20:04:55 2001 From: nestor.florez at intel.com (Florez, Nestor) Date: Thu Aug 5 00:20:16 2004 Subject: running cgi in NT Message-ID: ~sdpm~ OK guys, I have not done a cgi in a long time and never on a pc. I am trying to display the environment variables in a web page, but everytime I run it, NT ask me to save it or run it. I say run it and it opens a separate window and it runs it. I am using apache server. Has anyone ran into this problem before? Thanks, Nestor Ps. if youhave a small perl program that display the $ENV(environment variable) I would appreciated. ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From rkleeman at neta.com Mon Feb 5 20:27:02 2001 From: rkleeman at neta.com (Bobby Kleemann) Date: Thu Aug 5 00:20:16 2004 Subject: running cgi in NT In-Reply-To: Message-ID: ~sdpm~ On Mon, 5 Feb 2001, Florez, Nestor wrote: > ~sdpm~ > OK guys, > > I have not done a cgi in a long time and never on a pc. I am trying to > display the environment variables in a web page, but everytime I run it, NT > ask me to save it or run it. I say run it and it opens a separate window > and it runs it. > > I am using apache server. Has anyone ran into this problem before? ;-) Install Linux. j/k. I don't run NT so I can't answer this, other than to say check the docs on the Apache website. Hopefully someone else will have a better answer. > Ps. if youhave a small perl program that display the $ENV(environment > variable) I would appreciated. use CGI; use Data::Dumper; print CGI::header('text/plain'), Data::Dumper::Dumper(\%ENV); _ _ _ Bobby Kleemann http://www.neta.com/~rkleeman/ ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From bruce at brtnet.org Mon Feb 5 22:00:15 2001 From: bruce at brtnet.org (Bruce Timberlake) Date: Thu Aug 5 00:20:16 2004 Subject: MP3 employees References: Message-ID: <00a601c08ff1$4ffd8940$02f39140@develop> ~sdpm~ Sorry to use the forum like this, but could any/all the MP3 Mongers reply to me off-list? I need to know if any of you are in the loop as far as evaluating servers, etc. I know that the local Sun people want to come see you (with me), but I don't want it to be more painful than it has to be on either side... Any one specific I should [talk to|avoid] about Sun and/or Cobalt appliances?? Thanks... - Bruce Timberlake ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From chuckphillips at mac.com Tue Feb 6 11:19:16 2001 From: chuckphillips at mac.com (Chuck Phillips) Date: Thu Aug 5 00:20:16 2004 Subject: running cgi in NT In-Reply-To: Message-ID: ~sdpm~ >> I have not done a cgi in a long time and never on a pc. I am trying to >> display the environment variables in a web page, but everytime I run it, NT >> ask me to save it or run it. I say run it and it opens a separate window >> and it runs it. >> >> I am using apache server. Has anyone ran into this problem before? > Check to see that apache is configured to execute cgi's everywhere or else stick your cgi's in the cgi-bin. Also check your file extensions. If you're naming your files with .pl extensions, you'll need to make sure apache knows about it. -Chuck ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From chuckphillips at mac.com Tue Feb 6 11:21:23 2001 From: chuckphillips at mac.com (Chuck Phillips) Date: Thu Aug 5 00:20:16 2004 Subject: speaking to MS SQL Server using the ODBC module Message-ID: ~sdpm~ Perl Mongers, We have most of our perl running on Sun machines. Currently any database stuff we do is with MySQL or Oracle, but we just purchased MS SQL Server and plan on developing on Win32 using that DBMS. I'm curious about the ODBC module on CPAN. Can I just get that working on our Solaris Servers and then make calls to the MS SQL server? Has anyone had any experience with a similar setup? Is the ODBC module a pain to install? (I was playing with it on an BSD machine and the make died.) Thanks, Chuck ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From astewart at spawar.navy.mil Tue Feb 6 11:29:19 2001 From: astewart at spawar.navy.mil (Alan Stewart) Date: Thu Aug 5 00:20:16 2004 Subject: running cgi in NT In-Reply-To: Message-ID: <3A7FC3EF.4371.267AD4@localhost> ~sdpm~ On 5 Feb 2001, at 18:04, Florez, Nestor wrote: > ~sdpm~ > OK guys, > > I have not done a cgi in a long time and never on a pc. I am trying to > display the environment variables in a web page, but everytime I run it, NT > ask me to save it or run it. I say run it and it opens a separate window > and it runs it. > > I am using apache server. Has anyone ran into this problem before? > I assume the server is on the NT box also, but it really doesn't matter. The server doesn't know that it is a CGI script, so it is simply doing a download. The NT browser then offers the choice of saving or running. You need to either put the CGI script into a server directory in which Apache considers anything there to be a CGI executable (typical default directory is cgi-bin) or configure Apache to treat all files of that type to be executable. If your Apache is an NT binary "out-of-the-box", CGI may not be enabled. Check your ScriptAlias and AddHandler directives. Also, the ScriptInterpreterSource directive decides whether perl.exe is found from the #! line at the beginning of the script (like UNIX) or by NT associations (assuming you made one). ------------------------------------------------------------- Alan Stewart )-[]-( Electronics Engineer Code D621 ~ ~ Network Operations SPAWARSYSCEN ~ ~ \ Satellite Communications 53560 Hull St ( ~ ~ ) tel (619)524-3625 San Diego,CA __|___ /| fax (619)524-2607 92152-5001 ^\____/^^^^^^\ __| |_ astewart@spawar.navy.mil -------------^^^^^^^^^^^^^^^\__|______|_------------------------- ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From chris at velocigen.com Tue Feb 6 12:10:54 2001 From: chris at velocigen.com (Chris Radcliff) Date: Thu Aug 5 00:20:16 2004 Subject: speaking to MS SQL Server using the ODBC module References: Message-ID: <3A803E2E.2020303@velocigen.com> ~sdpm~ Chuck Phillips wrote: > I'm curious about the ODBC module on CPAN. Can I just get that > working on our Solaris Servers and then make calls to the MS SQL > server? Has anyone had any experience with a similar setup? Is the > ODBC module a pain to install? (I was playing with it on an BSD > machine and the make died.) > Unfortunately, it's not that easy. The ODBC module relies on the server having ODBC drivers installed, so you'll need to get an ODBC manager for Solaris and install it before you make the Perl module. Several companies make ODBC managers and drivers for Solaris, but I don't remember any offhand. Alternately, you can use DBD::Proxy on the Solaris box and run a DBI::Proxy server on the Windows NT machine. The proxy server will connect to MS-SQL via ODBC, and then the Solaris box can connect to it. It's a little more overhead, but nothing really noticeable. ~chris ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From todd.rockhold at ontogen.com Tue Feb 13 14:27:50 2001 From: todd.rockhold at ontogen.com (Todd Rockhold) Date: Thu Aug 5 00:20:16 2004 Subject: newbie CGI question Message-ID: <01Feb13.124740pst.118081@gateway.ontogen.com> ~sdpm~ I have a standalone perl script which runs fine but fails as a cgi script (error 500: internal server error). The culprit appears to be the following line: $result = qx(echo '$smiles' | /usr/home/thor/v471/contrib/src/c/tpsa/tpsa); Attempt to trap the error with an eval{} block had no detectable effect. How do I do the equivalent in a CGI script? What rule am I breaking? What tutorials/documentation addresses running another program from within a CGI script? ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From rkleeman at neta.com Tue Feb 13 14:49:09 2001 From: rkleeman at neta.com (Bobby Kleemann) Date: Thu Aug 5 00:20:16 2004 Subject: newbie CGI question In-Reply-To: <01Feb13.124740pst.118081@gateway.ontogen.com> Message-ID: ~sdpm~ What's the error message being printed out in the error_log? _ _ _ Bobby Kleemann http://www.neta.com/~rkleeman/ On Tue, 13 Feb 2001, Todd Rockhold wrote: > ~sdpm~ > I have a standalone perl script which runs fine but fails as a cgi script > (error 500: internal server error). > > The culprit appears to be the following line: > > $result = qx(echo '$smiles' | > /usr/home/thor/v471/contrib/src/c/tpsa/tpsa); > > Attempt to trap the error with an eval{} block had no detectable effect. > > How do I do the equivalent in a CGI script? > What rule am I breaking? > What tutorials/documentation addresses running another program from within a > CGI script? > ~sdpm~ > > The posting address is: san-diego-pm-list@hfb.pm.org > > List requests should be sent to: majordomo@hfb.pm.org > > If you ever want to remove yourself from this mailing list, > you can send mail to with the following > command in the body of your email message: > > unsubscribe san-diego-pm-list > > If you ever need to get in contact with the owner of the list, > (if you have trouble unsubscribing, or have questions about the > list itself) send email to . > This is the general rule for most mailing lists when you need > to contact a human. > ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From todd.rockhold at ontogen.com Tue Feb 13 17:35:10 2001 From: todd.rockhold at ontogen.com (Todd Rockhold) Date: Thu Aug 5 00:20:16 2004 Subject: newbie CGI question Message-ID: <01Feb13.155456pst.118081@gateway.ontogen.com> ~sdpm~ In case any other newbies out there care, I'll post this to the mail list. Thanks to President Kleemann for the tip. In fact, there was something from STDERR. At first glance, the tpsa application program appears to have different license requirements for stand-alone versus cgi use. The text came out plain as day on the html form. So this may not be a CGI programming problem per se. An unexpected wrinkle for my first try at CGI. Oh, well... > -----Original Message----- > From: Bobby Kleemann [SMTP:rkleeman@neta.com] > Sent: Tuesday, February 13, 2001 1:44 PM > To: Todd Rockhold > Subject: RE: newbie CGI question > > Try putting this at the end of the qx() line, " 2>&1" > > I think what's going on is something is being printed out on STDERR, which > the webserver is taking to be the begining of output, except the output > doesn't look like a typical CGI header (Content-type: text/html, ...). > > _ _ _ > Bobby Kleemann > http://www.neta.com/~rkleeman/ > > On Tue, 13 Feb 2001, Todd Rockhold wrote: > > > There are about 60 log files on the machine, but what appears to be the > > germane one contains (I replaced the IP address with "[IP address]" and > the > > path to my cgi script with "[path to my cgi script]"): > > > > [13/Feb/2001:13:07:38] failure: for host [IP address] trying to POST > [path > > to my cgi script], cgi-parse-output reports: the CGI program [path to my > cgi > > script] did not produce a valid header (name without value: got line > > "****************************************************************") > > A simplified version of the script appears below. With respect to my > > question, it exhibits the same behavior: > > > > #!/usr/bin/perl -w > > use strict; > > > > # use CGI; > > > > $ENV{DY_LICENSE_DATA}="/usr/home/thor/v471/etc/dy_license.dat"; > > $ENV{DY_ROOT}="/usr/home/thor/v471"; > > $ENV{LD_LIBRARY_PATH}="/lib:/usr/lib:/usr/home/thor/v471/lib"; > > > > my %FORM; > > my $smiles = "Q"; > > > > print "Content-type:text/html\n\n"; > > > > my $buffer; > > read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); > > my @pairs = split(/&/, $buffer); > > foreach my $pair (@pairs) > > { > > my $name; > > my $value; > > ($name, $value) = split(/=/, $pair); > > $value =~ tr/+/ /; > > $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; > > $FORM{$name} = $value; > > } > > > > > > print "Form Output"; > > print "

Results from FORM post

\n"; > > > > $smiles = $FORM{"SMILES"}; > > > > > > foreach my $key (sort keys(%FORM)) > > { > > eval {print "$key = $FORM{$key}
"}; > > print "error: $@
" if $@; > > } > > > > $smiles = "CCCCCC"; > > my $result = qx(echo '$smiles' | > > /usr/home/thor/v471/contrib/src/c/tpsa/tpsa); > > print ""; > > > -----Original Message----- > > > From: Bobby Kleemann [SMTP:rkleeman@neta.com] > > > Sent: Tuesday, February 13, 2001 12:49 PM > > > To: Todd Rockhold > > > Cc: 'san-diego-pm-list@happyfunball.pm.org' > > > Subject: Re: newbie CGI question > > > > > > ~sdpm~ > > > What's the error message being printed out in the error_log? > > > > > > _ _ _ > > > Bobby Kleemann > > > http://www.neta.com/~rkleeman/ > > > > > > On Tue, 13 Feb 2001, Todd Rockhold wrote: > > > > > > > ~sdpm~ > > > > I have a standalone perl script which runs fine but fails as a cgi > > > script > > > > (error 500: internal server error). > > > > > > > > The culprit appears to be the following line: > > > > > > > > $result = qx(echo '$smiles' | > > > > /usr/home/thor/v471/contrib/src/c/tpsa/tpsa); > > > > > > > > Attempt to trap the error with an eval{} block had no detectable > effect. > > > > > > > > How do I do the equivalent in a CGI script? > > > > What rule am I breaking? > > > > What tutorials/documentation addresses running another program from > > > within a > > > > CGI script? > > > > ~sdpm~ > > > > > > > > The posting address is: san-diego-pm-list@hfb.pm.org > > > > > > > > List requests should be sent to: majordomo@hfb.pm.org > > > > > > > > If you ever want to remove yourself from this mailing list, > > > > you can send mail to with the > following > > > > command in the body of your email message: > > > > > > > > unsubscribe san-diego-pm-list > > > > > > > > If you ever need to get in contact with the owner of the list, > > > > (if you have trouble unsubscribing, or have questions about the > > > > list itself) send email to > > > > . > > > > This is the general rule for most mailing lists when you need > > > > to contact a human. > > > > > > > > > > ~sdpm~ > > > > > > The posting address is: san-diego-pm-list@hfb.pm.org > > > > > > List requests should be sent to: majordomo@hfb.pm.org > > > > > > If you ever want to remove yourself from this mailing list, > > > you can send mail to with the > following > > > command in the body of your email message: > > > > > > unsubscribe san-diego-pm-list > > > > > > If you ever need to get in contact with the owner of the list, > > > (if you have trouble unsubscribing, or have questions about the > > > list itself) send email to > . > > > This is the general rule for most mailing lists when you need > > > to contact a human. > > ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From rkleeman at neta.com Tue Feb 13 17:53:23 2001 From: rkleeman at neta.com (Bobby Kleemann) Date: Thu Aug 5 00:20:16 2004 Subject: newbie CGI question In-Reply-To: <01Feb13.155456pst.118081@gateway.ontogen.com> Message-ID: ~sdpm~ Depending on how the program detects it's being run as a CGI you may be able to trick it into running. It probably detects the CGI environment variables, so if you delete all the environment variables that your webserver sets for CGI you might be able to get it to run. _ _ _ Bobby Kleemann http://www.neta.com/~rkleeman/ On Tue, 13 Feb 2001, Todd Rockhold wrote: > In case any other newbies out there care, I'll post this to the mail list. > > Thanks to President Kleemann for the tip. > > In fact, there was something from STDERR. At first glance, the tpsa > application program > appears to have different license requirements for stand-alone versus cgi > use. The text came out plain as > day on the html form. So this may not be a CGI programming problem per se. > An unexpected wrinkle > for my first try at CGI. Oh, well... > > > -----Original Message----- > > From: Bobby Kleemann [SMTP:rkleeman@neta.com] > > Sent: Tuesday, February 13, 2001 1:44 PM > > To: Todd Rockhold > > Subject: RE: newbie CGI question > > > > Try putting this at the end of the qx() line, " 2>&1" > > > > I think what's going on is something is being printed out on STDERR, which > > the webserver is taking to be the begining of output, except the output > > doesn't look like a typical CGI header (Content-type: text/html, ...). > > > > _ _ _ > > Bobby Kleemann > > http://www.neta.com/~rkleeman/ > > > > On Tue, 13 Feb 2001, Todd Rockhold wrote: > > > > > There are about 60 log files on the machine, but what appears to be the > > > germane one contains (I replaced the IP address with "[IP address]" and > > the > > > path to my cgi script with "[path to my cgi script]"): > > > > > > [13/Feb/2001:13:07:38] failure: for host [IP address] trying to POST > > [path > > > to my cgi script], cgi-parse-output reports: the CGI program [path to my > > cgi > > > script] did not produce a valid header (name without value: got line > > > "****************************************************************") > > > A simplified version of the script appears below. With respect to my > > > question, it exhibits the same behavior: > > > > > > #!/usr/bin/perl -w > > > use strict; > > > > > > # use CGI; > > > > > > $ENV{DY_LICENSE_DATA}="/usr/home/thor/v471/etc/dy_license.dat"; > > > $ENV{DY_ROOT}="/usr/home/thor/v471"; > > > $ENV{LD_LIBRARY_PATH}="/lib:/usr/lib:/usr/home/thor/v471/lib"; > > > > > > my %FORM; > > > my $smiles = "Q"; > > > > > > print "Content-type:text/html\n\n"; > > > > > > my $buffer; > > > read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); > > > my @pairs = split(/&/, $buffer); > > > foreach my $pair (@pairs) > > > { > > > my $name; > > > my $value; > > > ($name, $value) = split(/=/, $pair); > > > $value =~ tr/+/ /; > > > $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; > > > $FORM{$name} = $value; > > > } > > > > > > > > > print "Form Output"; > > > print "

Results from FORM post

\n"; > > > > > > $smiles = $FORM{"SMILES"}; > > > > > > > > > foreach my $key (sort keys(%FORM)) > > > { > > > eval {print "$key = $FORM{$key}
"}; > > > print "error: $@
" if $@; > > > } > > > > > > $smiles = "CCCCCC"; > > > my $result = qx(echo '$smiles' | > > > /usr/home/thor/v471/contrib/src/c/tpsa/tpsa); > > > print ""; > > > > -----Original Message----- > > > > From: Bobby Kleemann [SMTP:rkleeman@neta.com] > > > > Sent: Tuesday, February 13, 2001 12:49 PM > > > > To: Todd Rockhold > > > > Cc: 'san-diego-pm-list@happyfunball.pm.org' > > > > Subject: Re: newbie CGI question > > > > > > > > ~sdpm~ > > > > What's the error message being printed out in the error_log? > > > > > > > > _ _ _ > > > > Bobby Kleemann > > > > http://www.neta.com/~rkleeman/ > > > > > > > > On Tue, 13 Feb 2001, Todd Rockhold wrote: > > > > > > > > > ~sdpm~ > > > > > I have a standalone perl script which runs fine but fails as a cgi > > > > script > > > > > (error 500: internal server error). > > > > > > > > > > The culprit appears to be the following line: > > > > > > > > > > $result = qx(echo '$smiles' | > > > > > /usr/home/thor/v471/contrib/src/c/tpsa/tpsa); > > > > > > > > > > Attempt to trap the error with an eval{} block had no detectable > > effect. > > > > > > > > > > How do I do the equivalent in a CGI script? > > > > > What rule am I breaking? > > > > > What tutorials/documentation addresses running another program from > > > > within a > > > > > CGI script? > > > > > ~sdpm~ > > > > > > > > > > The posting address is: san-diego-pm-list@hfb.pm.org > > > > > > > > > > List requests should be sent to: majordomo@hfb.pm.org > > > > > > > > > > If you ever want to remove yourself from this mailing list, > > > > > you can send mail to with the > > following > > > > > command in the body of your email message: > > > > > > > > > > unsubscribe san-diego-pm-list > > > > > > > > > > If you ever need to get in contact with the owner of the list, > > > > > (if you have trouble unsubscribing, or have questions about the > > > > > list itself) send email to > > > > > > . > > > > > This is the general rule for most mailing lists when you need > > > > > to contact a human. > > > > > > > > > > > > > ~sdpm~ > > > > > > > > The posting address is: san-diego-pm-list@hfb.pm.org > > > > > > > > List requests should be sent to: majordomo@hfb.pm.org > > > > > > > > If you ever want to remove yourself from this mailing list, > > > > you can send mail to with the > > following > > > > command in the body of your email message: > > > > > > > > unsubscribe san-diego-pm-list > > > > > > > > If you ever need to get in contact with the owner of the list, > > > > (if you have trouble unsubscribing, or have questions about the > > > > list itself) send email to > > . > > > > This is the general rule for most mailing lists when you need > > > > to contact a human. > > > > ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human. From todd.rockhold at ontogen.com Tue Feb 13 18:04:02 2001 From: todd.rockhold at ontogen.com (Todd Rockhold) Date: Thu Aug 5 00:20:16 2004 Subject: newbie CGI question Message-ID: <01Feb13.162354pst.118083@gateway.ontogen.com> ~sdpm~ Interesting idea. In fact the tpsa program is a "contributed program" (developed by a member of the user community and contributed back to the whole user community) so that seems OK. I'd have to think more about it for the vendor programs however. In this case it seems that tpsa requires the license file to be defined in environment variable DY_LICENSE_DATA for standalone and DY_LICENSEDATA for CGI. I'll have to investigate the others. Sigh. > -----Original Message----- > From: Bobby Kleemann [SMTP:rkleeman@neta.com] > Sent: Tuesday, February 13, 2001 3:53 PM > To: Todd Rockhold > Cc: 'san-diego-pm-list@happyfunball.pm.org' > Subject: RE: newbie CGI question > > Depending on how the program detects it's being run as a CGI you may be > able to trick it into running. It probably detects the CGI environment > variables, so if you delete all the environment variables that your > webserver sets for CGI you might be able to get it to run. > > _ _ _ > Bobby Kleemann > http://www.neta.com/~rkleeman/ > > On Tue, 13 Feb 2001, Todd Rockhold wrote: > > > In case any other newbies out there care, I'll post this to the mail > list. > > > > Thanks to President Kleemann for the tip. > > > > In fact, there was something from STDERR. At first glance, the tpsa > > application program > > appears to have different license requirements for stand-alone versus > cgi > > use. The text came out plain as > > day on the html form. So this may not be a CGI programming problem per > se. > > An unexpected wrinkle > > for my first try at CGI. Oh, well... > > > > > -----Original Message----- > > > From: Bobby Kleemann [SMTP:rkleeman@neta.com] > > > Sent: Tuesday, February 13, 2001 1:44 PM > > > To: Todd Rockhold > > > Subject: RE: newbie CGI question > > > > > > Try putting this at the end of the qx() line, " 2>&1" > > > > > > I think what's going on is something is being printed out on STDERR, > which > > > the webserver is taking to be the begining of output, except the > output > > > doesn't look like a typical CGI header (Content-type: text/html, ...). > > > > > > _ _ _ > > > Bobby Kleemann > > > http://www.neta.com/~rkleeman/ > > > > > > On Tue, 13 Feb 2001, Todd Rockhold wrote: > > > > > > > There are about 60 log files on the machine, but what appears to be > the > > > > germane one contains (I replaced the IP address with "[IP address]" > and > > > the > > > > path to my cgi script with "[path to my cgi script]"): > > > > > > > > [13/Feb/2001:13:07:38] failure: for host [IP address] trying to POST > > > [path > > > > to my cgi script], cgi-parse-output reports: the CGI program [path > to my > > > cgi > > > > script] did not produce a valid header (name without value: got line > > > > "****************************************************************") > > > > A simplified version of the script appears below. With respect to > my > > > > question, it exhibits the same behavior: > > > > > > > > #!/usr/bin/perl -w > > > > use strict; > > > > > > > > # use CGI; > > > > > > > > $ENV{DY_LICENSE_DATA}="/usr/home/thor/v471/etc/dy_license.dat"; > > > > $ENV{DY_ROOT}="/usr/home/thor/v471"; > > > > $ENV{LD_LIBRARY_PATH}="/lib:/usr/lib:/usr/home/thor/v471/lib"; > > > > > > > > my %FORM; > > > > my $smiles = "Q"; > > > > > > > > print "Content-type:text/html\n\n"; > > > > > > > > my $buffer; > > > > read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); > > > > my @pairs = split(/&/, $buffer); > > > > foreach my $pair (@pairs) > > > > { > > > > my $name; > > > > my $value; > > > > ($name, $value) = split(/=/, $pair); > > > > $value =~ tr/+/ /; > > > > $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; > > > > $FORM{$name} = $value; > > > > } > > > > > > > > > > > > print "Form Output"; > > > > print "

Results from FORM post

\n"; > > > > > > > > $smiles = $FORM{"SMILES"}; > > > > > > > > > > > > foreach my $key (sort keys(%FORM)) > > > > { > > > > eval {print "$key = $FORM{$key}
"}; > > > > print "error: $@
" if $@; > > > > } > > > > > > > > $smiles = "CCCCCC"; > > > > my $result = qx(echo '$smiles' | > > > > /usr/home/thor/v471/contrib/src/c/tpsa/tpsa); > > > > print ""; > > > > > -----Original Message----- > > > > > From: Bobby Kleemann [SMTP:rkleeman@neta.com] > > > > > Sent: Tuesday, February 13, 2001 12:49 PM > > > > > To: Todd Rockhold > > > > > Cc: 'san-diego-pm-list@happyfunball.pm.org' > > > > > Subject: Re: newbie CGI question > > > > > > > > > > ~sdpm~ > > > > > What's the error message being printed out in the error_log? > > > > > > > > > > _ _ _ > > > > > Bobby Kleemann > > > > > http://www.neta.com/~rkleeman/ > > > > > > > > > > On Tue, 13 Feb 2001, Todd Rockhold wrote: > > > > > > > > > > > ~sdpm~ > > > > > > I have a standalone perl script which runs fine but fails as a > cgi > > > > > script > > > > > > (error 500: internal server error). > > > > > > > > > > > > The culprit appears to be the following line: > > > > > > > > > > > > $result = qx(echo '$smiles' | > > > > > > /usr/home/thor/v471/contrib/src/c/tpsa/tpsa); > > > > > > > > > > > > Attempt to trap the error with an eval{} block had no detectable > > > effect. > > > > > > > > > > > > How do I do the equivalent in a CGI script? > > > > > > What rule am I breaking? > > > > > > What tutorials/documentation addresses running another program > from > > > > > within a > > > > > > CGI script? > > > > > > ~sdpm~ > > > > > > > > > > > > The posting address is: san-diego-pm-list@hfb.pm.org > > > > > > > > > > > > List requests should be sent to: majordomo@hfb.pm.org > > > > > > > > > > > > If you ever want to remove yourself from this mailing list, > > > > > > you can send mail to with the > > > following > > > > > > command in the body of your email message: > > > > > > > > > > > > unsubscribe san-diego-pm-list > > > > > > > > > > > > If you ever need to get in contact with the owner of the list, > > > > > > (if you have trouble unsubscribing, or have questions about the > > > > > > list itself) send email to > > > > > > > > . > > > > > > This is the general rule for most mailing lists when you need > > > > > > to contact a human. > > > > > > > > > > > > > > > > ~sdpm~ > > > > > > > > > > The posting address is: san-diego-pm-list@hfb.pm.org > > > > > > > > > > List requests should be sent to: majordomo@hfb.pm.org > > > > > > > > > > If you ever want to remove yourself from this mailing list, > > > > > you can send mail to with the > > > following > > > > > command in the body of your email message: > > > > > > > > > > unsubscribe san-diego-pm-list > > > > > > > > > > If you ever need to get in contact with the owner of the list, > > > > > (if you have trouble unsubscribing, or have questions about the > > > > > list itself) send email to > > > . > > > > > This is the general rule for most mailing lists when you need > > > > > to contact a human. > > > > > > ~sdpm~ The posting address is: san-diego-pm-list@hfb.pm.org List requests should be sent to: majordomo@hfb.pm.org If you ever want to remove yourself from this mailing list, you can send mail to with the following command in the body of your email message: unsubscribe san-diego-pm-list If you ever need to get in contact with the owner of the list, (if you have trouble unsubscribing, or have questions about the list itself) send email to . This is the general rule for most mailing lists when you need to contact a human.