View previous topic :: View next topic |
Author |
Message |
ccs -
Joined: 02 Apr 2005 Posts: 101
|
Posted: Mon Apr 04, 2005 7:06 am Post subject: [SSI Error in directive exec in line 155: Not Found] |
|
|
I purchased the PRO version on a recommendation from others. I'm impressed with its easy of configuration, except for .exe CGI apps.
I make extensive use of windows executables (please don't lecture me about the dangers, I write these myself) and they work perfectly under Sambar and Apache, but I keep getting exec not found under Abyss. I've tried creating virtual paths and used full path names in my web pages but the results are always the same.
What I'd like is to set a global parameter somehow that would make the web server always look for cgi executables in the /cgi-bin/ directory of each virtual web site. Short of that, I'd settle for any form of wildcard setting on a per domain basis.
Actually, at this point, I'd be happy just to get one cgi app to work :)
Can someone please tell me in simple English, how I can configure this server to run CGI apps?
TIA. |
|
Back to top |
|
|
goose -
Joined: 17 Sep 2002 Posts: 608 Location: The Land Of OZ! come here toto!
|
Posted: Mon Apr 04, 2005 9:18 am Post subject: |
|
|
so why cant you get ssi working ? _________________ living in an armish paradise.....no gates here!
mawuahahaha :) |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Mon Apr 04, 2005 10:17 am Post subject: |
|
|
First you have to create a folder called cgi-bin in your Abyss root , not htdocs
and then you have to configure Abyss to look in the cgi-bin for your CGI app
by adding a CGI Path called /cgi-bin , then you create an Aliases to that.
Detailed instructions
01. Create a folder called cgi-bin in your Abyss root.
02. Open your Console and click on Configure -> Scripting Parameters
and add a CGI Path for /cgi-bin and click ok and go to the Aliases. :-)
03. Add an aliases to the cgi-bin folder you created
Virtual Path: /cgi-bin
Real Path: cgi-bin
Note: The following code is used in SSI to execute CGI applications like PHP
and Perl but can also be used for executing local program apps on the server.
Used for executing CGI applications.
Code: |
<!-- #exec cgi="/cgi-bin/script" -->
|
Used for executing local applications.
Code: |
<!-- #exec cmd="Path to program" -->
|
Note: Before using this SSI directive you have to configure the SSI Param...
to allow the #exec directive , then you can start using these directives in SSI |
|
Back to top |
|
|
DavidGwillim -
Joined: 27 Mar 2005 Posts: 5
|
Posted: Thu Apr 07, 2005 6:21 am Post subject: Setting Up For Running Win32 CGI EXEs under Abyss |
|
|
Thanks for the details on how to setup to run Win32 EXE under Abyss. I got
it all working OK under my copy of X2.
One thing I don't understand is how I am supposed to use the line:
<!-- #exec cmd="Path to program" -->
I didn't seem to need it in my HTML file containing the FORM. All I used was:
<FORM METHOD="POST" ACTION="http://localhost/cgi-bin/dbg.exe">
After setting up per the the instructions in the post above this one.
Would someone mind explaining how you are supposed to use the line:
<!-- #exec cmd="Path to program" -->
I hate not understanding.
Thanks. |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Thu Apr 07, 2005 2:07 pm Post subject: |
|
|
The cmd parameters allows you to execute shell commands , say if you want to
get your IP information using the cmd.exe on windows , you could just type this.
Example: Shell Command
Code: |
<pre>
<!-- #exec cmd="ipconfig /all" -->
</pre> |
|
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Apr 07, 2005 2:17 pm Post subject: Re: Setting Up For Running Win32 CGI EXEs under Abyss |
|
|
DavidGwillim,
#exec cmd is meant to execute command line applications (the same that you could execute in a DOS window). Try the following SHTML file:
Code: |
<HTML>
<HEAD>
<TITLE>
SSI Test
</TITLE>
</HEAD>
<BODY>
<p>
Your operating system is <!-- #exec cmd="ver" -->
</p>
<p>
<tt>dir c:\</tt> output is:
<pre>
<!-- #exec cmd="dir c:\" -->
</pre>
</p>
</BODY>
</HTML>
|
_________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
DavidGwillim -
Joined: 27 Mar 2005 Posts: 5
|
Posted: Thu Apr 07, 2005 2:21 pm Post subject: <!-- #exec cmd="command" > |
|
|
I must be doing something wrong in the config for Abyss, as I tried the example html and get no output at all.
What setting could I have wrong?
Dave |
|
Back to top |
|
|
DavidGwillim -
Joined: 27 Mar 2005 Posts: 5
|
Posted: Thu Apr 07, 2005 2:26 pm Post subject: <!-- #exec cmd="command" --> |
|
|
OK, I figured it out. This only seems to work if you put the html in a file with an extension of .SHTML. Don't thoroughly understand why though.
I also noticed that the "dir c:\" example generates pretty wildly formatted output, indenting further and further to the right as the directory entries are printed. Why would that be?
Dave |
|
Back to top |
|
|
DavidGwillim -
Joined: 27 Mar 2005 Posts: 5
|
Posted: Thu Apr 07, 2005 2:38 pm Post subject: Security when SSI <-- #exec cmd="command" --> |
|
|
In Abyss, is there some standard way to prevent security problems when SSI shell stuff is activated? It seems like you could do a lot of damage to the server with a simple SHTML file using this capability.
I imagine that blocking creation/upload of files with an extension of .SHTML would be one way.
Dave |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Apr 07, 2005 2:43 pm Post subject: Re: <!-- #exec cmd="command" > |
|
|
DavidGwillim,
SSI directives will only be processed in SSI files. And SSI files are recognized by Abyss Web Server if their filename extension is listed in "SSI Parameters > Associated extensions" table. By default only .shtml, .shtm, and .stm are processed by SSI.
If you want to process .html files, add html to this table.
The formatting of dir is a little bit weird because of the line feeds DOS uses (which are not the same as those in HTML). dir was given as a quick example to show how to use #exec cmd (so do not pay too much attention to this formatting issue :-) ). _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
DavidGwillim -
Joined: 27 Mar 2005 Posts: 5
|
Posted: Thu Apr 07, 2005 2:56 pm Post subject: Weird formatting of DIR command |
|
|
It just hit me why the output of the dir command was formatting so wildly. The output contains the string <DIR> for every directory/folder entry in the list, and the browser is seeing that as an HTML tag to open a new directory listing. Since a </DIR> never appears they by default keep nesting and nesting for each folder and so the text moves further and further to the right.
You have to remember those tags - even when they aren't supposed to be tags - I guess... :) |
|
Back to top |
|
|
|