[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-win32-admin
Subject: RE: executables under windows
From: "Jon Jaques" <jonj () sysconn ! com>
Date: 2003-08-06 18:02:56
[Download RAW message or body]
Excellent! Glad to be able to help!
-----Original Message-----
From: Mario R. Sanchez [mailto:msanchez@dbiq.com]
Sent: Wednesday, August 06, 2003 10:10 AM
To: Jon Jaques
Cc: perl-win32-admin@listserv.ActiveState.com
Subject: Re: executables under windows
hi jon
you got it! the output always worked to the "screen" but apparently not
to STDOUT. changing the switches in the code and recompiling worked! the
accompanying file was called automatically for it was found via the
path.
thanks a million - much appreciated!
regards
mario
Jon Jaques wrote:
Okay, good, at least we verified that the server and basic code are
acceptable. Yes, the dependencies of the file could have an affect on
it... try putting all of the required files in system32 to test them,
but unless you have really good reason to do so, you probably shouldn't
leave them there, as they could be a security hazard. Another thing that
you might try is to put your exe's and dll's into a folder under your
site called "bin" and mark that folder as "Executable" via the IIS
Manager (assuming that you're using IIS webserver software)... That
might make some difference for you. Did you write/compile the
executables? Do they output on "STDOUT"? I don't know all that much
about this, but in VB, for instance, it does NOT by default output on
STDOUT, so you have to include a code module to provide that
functionality. Perl, on the other hand, outputs to STDOUT by default. I
have absolutely no idea about cobol and pascal, however. --Jon
-----Original Message-----
From: Mario R. Sanchez [mailto:msanchez@dbiq.com]
Sent: Tuesday, August 05, 2003 3:08 PM
To: Jon Jaques; perl-win32-admin@listserv.ActiveState.com
Subject: Re: executables under windows
hi jon
thank you so much - the code you provided works perfectly. however, when
i replace whois whith my hello.exe it does not display anything.
could it be that it may have something to do with that these .EXE's? one
is an .exe created in pascal from an old dos compiler, the other a newer
win32 cobol compiler that creates an exe but requires 2 .dll's to run?
odd how under the command prompt perl hello.pl works perfectly using
either of these .EXEs - but via the browser/cgi they dont work.
thank you so much for any ideas.
mario
Jon Jaques wrote:
Okay, try this: (it uses "whois.exe" from softgears.com, which must be
placed in your system32 dir):
------------------------------------------------------------------------
-# This code has been tested, and can be seen at:#
http://monitor.sysconn.com/cgi-bin/test.pluse CGI qw/:standard :netscape
:html3 -no_debug/;
my $query = new CGI;
$| = 1;print
header,
start_html('DOMAIN RESEARCHER!');
my $action;
my $val;$action = "whois sysconn.com";
$val = `$action`;
print "The value is: \n<pre>" . $val .
"</pre>";---------------------------------------------------------------
----------HTH,--Jon
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1170" name=GENERATOR></HEAD>
<BODY lang=ZH-CN style="tab-interval: 21.0pt" vLink=#0000ff link=#0000ff
bgColor=#ffffff>
<DIV><SPAN class=506230218-06082003><FONT face=Arial color=#0000ff
size=2>Excellent! Glad to be able to help!</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; \
MARGIN-RIGHT: 0px"> <DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Mario R. Sanchez
[mailto:msanchez@dbiq.com] <BR><B>Sent:</B> Wednesday, August 06, 2003 10:10
AM<BR><B>To:</B> Jon Jaques<BR><B>Cc:</B>
perl-win32-admin@listserv.ActiveState.com<BR><B>Subject:</B> Re: executables
under windows<BR><BR></FONT></DIV>hi jon
<P>you got it! the output always worked to the "screen" but apparently not to
STDOUT. changing the switches in the code and recompiling worked! the
accompanying file was called automatically for it was found via the path.
<P>thanks a million - much appreciated!
<P>regards <BR>mario
<P>Jon Jaques wrote:
<BLOCKQUOTE TYPE="CITE"> <FONT face=Arial><FONT color=#0000ff><FONT
size=-1>Okay, good, at least we verified that the server and basic code are
acceptable.</FONT></FONT></FONT> <FONT face=Arial><FONT
color=#0000ff><FONT size=-1>Yes, the dependencies of the file could have an
affect on it... try putting all of the required files in system32 to test
them, but unless you have really good reason to do so, you probably
shouldn't leave them there, as they could be a security
hazard.</FONT></FONT></FONT> <FONT face=Arial><FONT color=#0000ff><FONT
size=-1>Another thing that you might try is to put your exe's and dll's into
a folder under your site called "bin" and mark that folder as "Executable"
via the IIS Manager (assuming that you're using IIS webserver software)...
That might make some difference for you.</FONT></FONT></FONT> <FONT
face=Arial><FONT color=#0000ff><FONT size=-1>Did you write/compile the
executables? Do they output on "STDOUT"? I don't know all that much about
this, but in VB, for instance, it does NOT by default output on STDOUT, so
you have to include a code module to provide that functionality. Perl, on
the other hand, outputs to STDOUT by default. I have absolutely no idea
about cobol and pascal, however.</FONT></FONT></FONT> <FONT
face=Arial><FONT color=#0000ff><FONT size=-1>--Jon</FONT></FONT></FONT>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; \
MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr><FONT face=Tahoma><FONT
size=-1>-----Original Message-----</FONT></FONT> <BR><FONT
face=Tahoma><FONT size=-1><B>From:</B> Mario R. Sanchez [<A
href="mailto:msanchez@dbiq.com">mailto:msanchez@dbiq.com</A>]</FONT></FONT>
<BR><FONT face=Tahoma><FONT size=-1><B>Sent:</B> Tuesday, August 05, 2003
3:08 PM</FONT></FONT> <BR><FONT face=Tahoma><FONT size=-1><B>To:</B> Jon
Jaques; perl-win32-admin@listserv.ActiveState.com</FONT></FONT> <BR><FONT
face=Tahoma><FONT size=-1><B>Subject:</B> Re: executables under
windows</FONT></FONT> <BR> </DIV>hi jon
<P>thank you so much - the code you provided works perfectly. however,
when i replace whois whith my hello.exe it does not display anything.
<P>could it be that it may have something to do with that these .EXE's?
one is an .exe created in pascal from an old dos compiler, the other a
newer win32 cobol compiler that creates an exe but requires 2 .dll's to
run?
<P>odd how under the command prompt perl hello.pl works perfectly using
either of these .EXEs - but via the browser/cgi they dont work.
<P>thank you so much for any ideas. <BR>mario
<P>Jon Jaques wrote:
<BLOCKQUOTE TYPE="CITE"> <FONT face=Arial><FONT color=#0000ff><FONT
size=-1>Okay, try this: (it uses "whois.exe" from softgears.com, which
must be placed in your system32 dir):</FONT></FONT></FONT> <FONT
face=Arial><FONT color=#0000ff><FONT
size=-1>-------------------------------------------------------------------------# \
This code has been tested, and can be seen at:# <A
href="http://monitor.sysconn.com/cgi-bin/test.pl">http://monitor.sysconn.com/cgi-bin/test.pl</A>use \
CGI qw/:standard :netscape :html3 -no_debug/;</FONT></FONT></FONT>
<BR><FONT face=Arial><FONT color=#0000ff><FONT size=-1>my $query = new
CGI;</FONT></FONT></FONT> <BR><FONT face=Arial><FONT color=#0000ff><FONT
size=-1>$| = 1;print</FONT></FONT></FONT> <BR><FONT face=Arial><FONT
color=#0000ff><FONT size=-1> header,</FONT></FONT></FONT> <BR><FONT
face=Arial><FONT color=#0000ff><FONT size=-1> start_html('DOMAIN
RESEARCHER!');</FONT></FONT></FONT> <BR><FONT face=Arial><FONT
color=#0000ff><FONT size=-1>my $action;</FONT></FONT></FONT> <BR><FONT
face=Arial><FONT color=#0000ff><FONT size=-1>my $val;$action = "whois
sysconn.com";</FONT></FONT></FONT> <BR><FONT face=Arial><FONT
color=#0000ff><FONT size=-1>$val = `$action`;</FONT></FONT></FONT>
<BR><FONT face=Arial><FONT color=#0000ff><FONT size=-1>print "The value
is: \n<pre>" . $val .
"</pre>";--------------------------------------------------------------- \
----------HTH,--Jon</FONT></FONT></FONT></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
_______________________________________________
Perl-Win32-Admin mailing list
Perl-Win32-Admin@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic