Linux and CGI

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
iru2
-


Joined: 25 Apr 2016
Posts: 2
Location: Australia

PostPosted: Mon Apr 25, 2016 8:08 am    Post subject: Linux and CGI Reply with quote

Gentlefolk,

Environment: Linux Mint 17.3, ABYSS 2.9.3.6 (New install). CGI executable - NATIVE code (PASCAL).

Reading lots of documents one configures the "scripting parameters" "scripting interpreter parameter" to point to the script interpreter (examples are generally ?.exe or ?.cgi).
The script type is then generally .PL, etc.

Operating CGI in "native" mode there is no script type. How/what do I configure here????

After a new install I set the "Docs" pointer to ~/WEB.
Saved an index.html file in WEB.
Saved the native CGI code in WEB as "web1".

HTTP to 127.0.0.1:8000/index.html and the index form displays.

HTTP to 127.0.0.1:8000/web1 and I get a window informing me that I have chosen to open Web1, save it, etc,...

I have tried all sorts of things like renaming the native CGI code to "web1.cgi" and trying http://127.0.0.1:8000/web1.cgi, etc. No go, some time a 404, mostly the attempt to download the native code.

The native CGI code talks: I can in the shell via STDIN, execute "echo "hello" | ./web1" and it reports an exception that I recognise from the native code.

The frustrating thing is I had this working some time ago. Saved all the files for the native CGI and ABYSS, loaded a new vrsion of Mint, re-installed, etc.

Any help appreciated, Ian.

.
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 772

PostPosted: Wed Apr 27, 2016 11:48 am    Post subject: Re: Linux and CGI Reply with quote

iru2,

On Linux, the CGI file must be executable (use chmod +x myscript.cgi to perform that change.)

It can be any executable (whether a true executable or a script with a shebang #! preamble).

It should be declared in the "Scripting Paths" table (not as an interpreter.)

That's it. If this does not help, please give us more details about your setup.
_________________
Forum Administrator
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message
iru2
-


Joined: 25 Apr 2016
Posts: 2
Location: Australia

PostPosted: Thu Apr 28, 2016 11:44 am    Post subject: Reply with quote

Gentlefolk,

No luck, I still have the problem.

File "web1" is executable.

File Web1 is a Pascal executable. I can talk to it via STDIN.

Deleted the scripting "interpreter" path, created the "script path" pointing to the executable.

Further details:

Project path: /home/iru/Projects/WEB
Native pascal executable: /home/iru/Projects/WEB/web1.

Document path: /home/iru/Proects/WEB.

WEB also contains a unique: index.html. 127.0.0.1:8000/index.html and 127.0.0.1:8000 invoke and display this index.html file.

I cannot find any means of attaching a file to here is the abyss.conf file:

Thanks, Ian.

<?xml version="1.0" encoding="UTF-8"?>
<root>
<server>
<parameters>
<root>
/home/iru/SW/abyssws/
</root>
<timeout>
30
</timeout>
<maxconn>
20
</maxconn>
<keepalive>
10
</keepalive>
<opsys>
<pidfile>
log/abyssws.pid
</pidfile>
<sysuser>
iru
</sysuser>
</opsys>
</parameters>
<host>
<names/>
<path>
/home/iru/Projects/WEB
</path>
<running>
yes
</running>
<id>
1
</id>
<scripting>
<enabled>
yes
</enabled>
<cgi>
<timeout>
30
</timeout>
<useregistry>
no
</useregistry>
<useshebang>
yes
</useshebang>
<errorfile>
log/cgi.log
</errorfile>
</cgi>
<isapi>
<ext>
dll
</ext>
<errorfile>
log/isapi.log
</errorfile>
<debuglevel>
0
</debuglevel>
</isapi>
<fastcgi>
<errorfile>
log/fastcgi.log
</errorfile>
<timeout>
240
</timeout>
<debuglevel>
1
</debuglevel>
</fastcgi>
<interpreters/>
<paths>
<path>
<vpath>
/home/iru/Projects/WEB/web1
</vpath>
<type>
0
</type>
<xsendfile>
no
</xsendfile>
<outputbuffersize>
0
</outputbuffersize>
</path>
</paths>
</scripting>
<ssi>
<extensions>
<ext>
shtml
</ext>
<ext>
shtm
</ext>
<ext>
stm
</ext>
</extensions>
<enabled>
yes
</enabled>
<errormessage/>
<timeformat/>
<abbreviatesize>
yes
</abbreviatesize>
<execcmd>
no
</execcmd>
</ssi>
<log>
<file>
log/access.log
</file>
<denied/>
<format>
.combined
</format>
</log>
<indexes>
<index>
index.html
</index>
<index>
index.htm
</index>
</indexes>
<antileech>
<paths/>
<redirect/>
<strict>
no
</strict>
<allowed/>
</antileech>
<bindip>
*
</bindip>
<dirlist>
<type>
1
</type>
<scope>
<order>
ad
</order>
<allow>
<path>
/
</path>
</allow>
</scope>
<hidden>
<file>
.*
</file>
</hidden>
</dirlist>
<port>
8000
</port>
<compress>
<level>
6
</level>
<scope>
<allow>
<path>
/
</path>
</allow>
<order>
ad
</order>
</scope>
<mimes>
<allow>
<mime>
text/*
</mime>
</allow>
</mimes>
</compress>
</host>
<throttle>
<maxspeed/>
<maxspeedperip/>
</throttle>
<antihack>
<enabled>
no
</enabled>
<threshold>
20
</threshold>
<monitorperiod>
20
</monitorperiod>
<banperiod>
60
</banperiod>
<logfile/>
<denied>
<ip>
127.0.0.1
</ip>
<ip>
::1
</ip>
</denied>
</antihack>
</server>
<version>
2.9.3.6
</version>
<console>
<port>
9999
</port>
<bindip>
*
</bindip>
<ipcontrol>
<order>
ad
</order>
<allow>
192.168.0.1-192.168.255.254
</allow>
<allow>
172.16.0.1-172.31.255.254
</allow>
<allow>
10.0.0.1-10.255.255.254
</allow>
<allow>
fc00::/7
</allow>
<allow>
fe80::/10
</allow>
</ipcontrol>
<language>
en
</language>
<login>
iru
</login>
<password>
df536aedac9e82949767059381433494
</password>
</console>
</root>
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 772

PostPosted: Mon May 02, 2016 6:01 pm    Post subject: Reply with quote

iru2,

Could you please get in touch with our technical support by email and send them abyss.conf as an attachment with a reference to this forum post?
_________________
Forum Administrator
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group