Terry,

mod_include is included (and I see you have it enabled) but you have to tell the server what to look at to see if it needs to execute them. You do that with the AddOutputFilter directive. Here are the ones that I set up:

AddOutputFilter INCLUDES .shtml
AddOutputFilter INCLUDES .htm
AddOutputFilter INCLUDES .html
AddOutputFilter INCLUDES .pgm

Matt

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Terry Anderson
Sent: Wednesday, November 14, 2007 9:39 AM
To: Web Enabling the AS400 / iSeries
Subject: Re: [WEB400] Exec cgi command not working

Scott,

I figured that I probably was not giving enough information. The problem
is, I don't know enough about CGI to know what to ask.

I know what a redirect is, I just don't know where it goes. Would it be
in the HTML or the config file? If it goes in the HTML, I don't think I
have one. I have listed the HTML & the current config file below.

I found this on the apache web site:

"To permit SSI on your server, you must have mod_include installed and
enabled. Additionally, you must have the following directive either in
your httpd.conf file, or in a .htaccess file:

Options +Includes "

Is there a way to tell if mod_include is on the i5?


HTML file:

/$header
Content-type: text/html
Pragma: no-cache
Expires: Sunday, November 3, 2007 23:00:00 GMT
/%cookiestring%/

<html>
<head>
<LINK href="/www/citcgidev/htmlsrc/base.css" rel=stylesheet
type=text/css>
<title>e-Store</title>
</head>
<body>
<!--#exec cgi="/citcgidevp/header"-->

/$main
Nice to see you, /%custname%/!<br><br>

<a href="/citcgidevp/items">Go Shopping!</a>

/$error
You entered an invalid customer number.<br><br>

Please return to the previous page and try again.

/$footer
</body>
</html>



Config File:


#=======================================================================
==
# APACHE directives to run CGIDEV2
#
# To complete the installation of these directives,
# execute the following command:
# CPYF FROMFILE(CGIDEV2/QATMHINSTC) TOFILE(QUSRSYS/QATMHINSTC)
# FROMMBR(CGIDEV2APA) TOMBR(CGIDEV2APA) MBROPT(*REPLACE)
CRTFILE(*YES)
#
# To start the HTTP instance for CGIDEV2,
# execute the following command:
# STRTCPSVR SERVER(*HTTP) HTTPSVR(CGIDEV2APA)
# Then, run command WRKACTJOB SBS(QHTTPSVR) and make sure that more than
# one CGIDEV2APA is running.
# If not, the CGIDEV2APA HTTP instance failed being started.
# You should then look in the joblogs for CGIDEV2APA jobs and find out
# what the error was.
#
# To run CGIDEV2, type the following in the location line of your
browser:
# http://yourAS400IpAddr:8014/cgidev2/start
#
#=======================================================================
==
# PART 1
#=======================================================================
==
ServerRoot /cgidev/conf
DocumentRoot /cgidev/conf/hotdocs
Listen 10.39.239.12:8014 FRCA
# Listen 8014
DefaultType text/html
# CGI
CGIConvMode %%EBCDIC/EBCDIC%%
ThreadsPerChild 53
MaxCGIJobs 100
StartCGI 2 QTMHHTP1
Timeout 120
# PERSISTENT CGI
MaxPersistentCGI 5
CGIRecyclePersist on
PersistentCGITimeout 60
# PERFORMANCE
DynamicCache on
CacheLocalSizeLimit 25000
FRCAEnableFileCache On
FRCACacheLocalFileRunTime /cgidev/*.gif
#=======================================================================
==
# PART 2
#=======================================================================
==
Options +ExecCGI -FollowSymLinks -SymLinksIfOwnerMatch +Includes
-MultiViews -Indexes
AlwaysDirectoryIndex off
DirectoryIndex index.html welcome.html
# The following directives regard the HTTP instance logs
# They are commented out. Uncomment them to have the logs generated
ErrorLog /www/citcgidev/conf/logs/basic_error_log
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
# LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Cookie}n \"%r\" %t" cookie
LogFormat "%{User-agent}i" agent
LogFormat "%{Referer}i -> %U" referer
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogMaint logs/error_log 7 0
CustomLog /www/citcgidev/conf/logs/access_log Common
LogMaint /www/citcgidev/conf/logs/basic_error_log 60 0
LogMaint /www/citcgidev/conf/logs/access_log 30 0
LogLength 512000000
LogLevel Debug
#
SetEnvIf User-Agent "Mozilla/2" nokeepalive
SetEnvIf User-Agent "JDK/1\.0" force-response-1.0
SetEnvIf User-Agent "Java/1\.0" force-response-1.0
SetEnvIf User-Agent "RealPlayer 4\.0" force-response-1.0
SetEnvIf User-Agent "MSIE 4\.0b2;" nokeepalive
SetEnvIf User-Agent "MSIE 4\.0b2;" downgrade-1.0
SetEnvIf User-Agent "MSIE 4\.0b2;" force-response-1.0
<Directory /cgidev/conf/htdocs>
Order Allow,Deny
Allow From all
</Directory>
<Directory /cgidev/docs>
Order Allow,Deny
Allow From all
</Directory>
#=======================================================================
==
# PART 3
#=======================================================================
==
#---- CGIDEV2 directives
Alias /docs/ /cgidev/docs/
AliasMatch /cgidev2h/(.*)\.htm
/QSYS.LIB/CGIDEV2.LIB/HTMLSRC.FILE/$1.mbr
AliasMatch /cgidev2o/(.*)\.htm
/QSYS.LIB/CGIDEV2.LIB/DEMOHTML.FILE/$1.mbr
AliasMatch /cgidev2oit/(.*)\.htm
/QSYS.LIB/CGIDEV2.LIB/DEMOHTMLIT.FILE/$1.mbr
Alias /cgidev2/start /qsys.lib/cgidev2.lib/demohtml.file/demoframe.mbr
Alias /cgidev/ /cgidev/
Alias /cgidevf/ /cgidev/
Alias /cgidevexthtml/ /cgidevexthtml/
Alias /cgidev2/ /qsys.lib/cgidev2.lib/
Alias /cgidev2h/ /QSYS.LIB/CGIDEV2.LIB/HTMLSRC.FILE/
Alias /cgidev2o/ /QSYS.LIB/CGIDEV2.LIB/DEMOHTML.FILE/
Alias /cgidev2oit/ /QSYS.LIB/CGIDEV2.LIB/DEMOHTMLIT.FILE/
ScriptAliasMatch /cgidev2p/(.*).cgi /qsys.lib/cgidev2.lib/$1.pgm
ScriptAliasMatch /cgidev2p/(.*) /qsys.lib/cgidev2.lib/$1
#=======================================================================
==
# PART 3
#=======================================================================
==
#---- CGIDEV2 directives
<Directory /cgidev>
Options None
order allow,deny
allow from all
</Directory>

<Directory /cgidevexthtml>
Options None
order allow,deny
allow from all
</Directory>

<Directory /QSYS.LIB/CGIDEV2.LIB>
Options None
order allow,deny
allow from all
</Directory>
#---- CITCGIDEV directives
Alias /citcgidev/ /citcgidev/
ScriptAliasMatch ^/citcgidevp(.*) /qsys.lib/citcgidev.lib/$1.pgm

<Directory /citcgidev>
Options None
order allow,deny
allow from all
</Directory>

<Directory /QSYS.LIB/CITCGIDEV.LIB>
Options None
order allow,deny
allow from all
</Directory>

Please note: Thomson Learning has changed its name to Cengage Learning. Visit www.cengage.com for more information.
Cengage Learning - delivering results through engagement.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.