From owner-freebsd-questions Mon Mar 25 10:51: 6 2002 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id AEB9837B400 for ; Mon, 25 Mar 2002 10:51:01 -0800 (PST) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.12.2/8.12.2) with ESMTP id g2PIovAd073706; Mon, 25 Mar 2002 12:50:58 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.2/8.12.2/Submit) id g2PIovOe073704; Mon, 25 Mar 2002 12:50:57 -0600 (CST) Date: Mon, 25 Mar 2002 12:50:56 -0600 From: Dan Nelson To: Drew Tomlinson Cc: Walter Hop , smorton@acm.org, questions@FreeBSD.ORG Subject: Re: Showing Uptime Via webpage Message-ID: <20020325185056.GE14939@dan.emsphone.com> References: <3C9E0754.2010104@verizon.net> <006201c1d423$ee01be00$f82a6ba5@lc.ca.gov> <200203251840.33315@silver.dt1.binity.net> <007a01c1d426$38b2c410$f82a6ba5@lc.ca.gov> <20020325182247.GD14939@dan.emsphone.com> <008401c1d42d$7ad8f420$f82a6ba5@lc.ca.gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <008401c1d42d$7ad8f420$f82a6ba5@lc.ca.gov> User-Agent: Mutt/1.3.28i X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Mar 25), Drew Tomlinson said: > From: "Dan Nelson" > > > > [in reply to Drew Tomlinson, Monday 25 March 2002 18:38] > > > > > > > > > > #!/usr/bin/perl > > > > > > print "Content-type: text/plain\n\n"; > > > > > > system ("uptime"); > > > > > > exit; > > > > > > > > > > I tried this just out of curiosity but ran into problems. I > > > > > don't get any errors but I just get a blank web page. > > > > > > > > What happens if you run "/usr/bin/uptime" instead of "uptime"? > > > > > > Thanks for your suggestion. However, "/usr/bin/uptime" makes no > > > difference. The page is still blank. > > > > Can you print any data at all? Note that you are generating an > > incorrect HTML header; the spec says you must use CRLFs, and some > > proxies/browsers may refuse to parse the page. > > I'm not sure exactly what you mean by "..print any data...". My web > server shows my static pages just fine. I have a test script that I If you just have #!/usr/bin/perl print "Content-type: text/plain\r\n\r\n"; print "Hello, World!\n"; Do you get output? If not, then chances are all CGIs will fail, and you have a generic CGI issue. If you do, then somehow your system("uptime") is failing without logging the error. -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message