From owner-freebsd-questions Mon Mar 25 11:24:49 2002 Delivered-To: freebsd-questions@freebsd.org Received: from blacklamb.mykitchentable.net (207-173-241-155.elk.frontiernet.net [207.173.241.155]) by hub.freebsd.org (Postfix) with ESMTP id B254237B416 for ; Mon, 25 Mar 2002 11:24:45 -0800 (PST) Received: from tagalong (unknown [165.107.42.248]) by blacklamb.mykitchentable.net (Postfix) with SMTP id 03C11EE65A; Mon, 25 Mar 2002 11:24:59 -0800 (PST) Message-ID: <011201c1d432$b8330810$f82a6ba5@lc.ca.gov> From: "Drew Tomlinson" To: "Dan Nelson" Cc: "Walter Hop" , , 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> <20020325185056.GE14939@dan.emsphone.com> <00c001c1d430$6596b9a0$f82a6ba5@lc.ca.gov> <20020325191249.GF14939@dan.emsphone.com> Subject: Re: Showing Uptime Via webpage Date: Mon, 25 Mar 2002 11:24:44 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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 ----- Original Message ----- From: "Dan Nelson" To: "Drew Tomlinson" Cc: "Walter Hop" ; ; Sent: Monday, March 25, 2002 11:12 AM Subject: Re: Showing Uptime Via webpage > In the last episode (Mar 25), Drew Tomlinson said: > > The "Hello World" works. You can see it for yourself at > > http://mykitchentable.net/cgi-bin/hello if you wish. > > > > I assumed from your example that to end with the proper CRLF, I > > needed to add an '\r'. Tried that but still no output. I also tried > > combining the system("uptime") with the hello world script but still > > only got the "Hello World" output. So maybe "system" does not work > > in cgi scripts? Or do you suspect I have something configured wrong? > > CRLF's are only required for the headers themselves (including the > blank line separating header and data). The data can be just > \n-delimited. > > system() should work fine, but you might want to check its returnvalue > and also check your webserver's error log (usually stderr is piped to a > log, not to the browser). I looked in httpd-error as well but no errors logged. Oh well, it's not that important to me at this time. I was just reading the list and thought I'd give it a try. If nothing else, I still learned a little about how web pages are done with perl. Thanks, Drew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message