APACHE server not displaying all in a CGI script HELP!

APACHE server not displaying all in a CGI script HELP!

Post by Phil Hun » Fri, 26 Jun 1998 04:00:00



hi

I have a script.  Worked fine on 4 web servers, including the one where
it just stopped working 3 days ago!!!

Rebooted, etc.   Apache 1.2.4, everytihng works fine, except CGI scripts
written in BASH!  In them, anything in a

cat << EOM

Messages to be displayed

EOM

Do not get displayed!!!!  So the HTML does not happen....Anything from
program output seems to come out.  It USED to work.  Works on 3 other
servers, and happens with ANY CGI-Script.

Here is my script....try it!  The URL is www.isone.com/cgi-bin/systat
Thanks.  Pulling my hair out over this one!!!

#!/bin/sh

if [ -e /tmp/pmwho.tmp ]; then
        rm /tmp/pmwho.tmp
fi
#
/usr/local/bin/pmstat PM3-1   > /tmp/pmwho.tmp
chmod 777 /tmp/pmwho.tmp
#
echo Content-type: text/html
echo

cat << EOM                                                                
<TITLE>ISONE SERVER System Status Page</TITLE>
<H1>ISONE SERVER System Status</H1>
<HR>

EOM
cat << EOM
<H3>Current Portmaster Dialup users:</H3>
<PRE>
EOM

cat /tmp/pmwho.tmp

cat << EOM
</PRE>
EOM

cat << EOM

<H3>Current uptime/Local users:</H3>
<PRE>
EOM

w

cat << EOM
</PRE>
<HR><BR>
<P ALIGN=left><H3>Disk Space:</H3></P>
<PRE>
EOM

df

cat << EOM                                                                                
</PRE>
<HR><BR>
<H3>Network Status:</H3>
<PRE>
EOM

/sbin/route

cat << EOM                                                                      
</PRE>
<HR><BR>
<H3>Current Processes:</H3>
<PRE>
EOM

ps -ax

cat << EOM
</PRE>
<HR><BR>
<H3>Last 20 Portmaster logins:</H3>
<PRE>
EOM

/usr/local/bin/pmlast

cat << EOM
</PRE>
<HR><BR>
<H3>Last 20 local logins:</H3>
<PRE>
EOM

last | head -n20

cat << EOM
</PRE>
<HR><BR>
<H3>Last 25 system messages:</H3>
<PRE>
EOM

tail -n25 /var/adm/messages

cat << EOM
</PRE>
<HR>
<H3>Have a nice day!</H3>
EOM

--

======================================================================

System Administrator                              work:  (603)424-5278
Internet Services of New England                  WWW:   www.isone.net
Merrimack, NH 03054                    "New England Internet for less"

 
 
 

1. apache: cgi script not in cgi-bin

Hi.
How can i make perl script which is not in cgi-bin directory work?
I am going to user cross-reference which is some cgi program( it's not
important).
This program need that cgi sript(that is perl) should be in subdirectory of
html.
How can i make it out?
I did in httpd.conf
<Directory /htmlbase>
AllowOverride All
</Directory>
and
in the directory , i made .htaccess file with proper syntax( this is
recommed in program install file).
but it doesn't work.
Only difference is that I got message "Forbidden permission" in browser.
When i didn't make .htaccess file, browser just show content of perl file
instead of working.
Could you help me?
The program can be downloaded on http://lxr.linux.no( the name is
cross-reference).

2. appending the text of a file to a bunch of files in a folder

3. Help: Apache: cgi script - malformed header from script

4. Multiple used IRQ's

5. cgi scripts not getting executed, only the source code gets displayed

6. Unix - Frequently Asked Questions (Contents) [Frequent posting]

7. Output from cgi scripts displaying as text not html formatted text

8. netscape bus error

9. apache: give /home/mailman/cgi-bin permissions to run cgi-scripts.

10. Using .cgi/.pl to enable CGI script in Apache

11. Running CGI Scripts on Apache Server

12. Netscape showing html code from cgi script (Apache Server)

13. apache suexec not executing ~user/script.cgi