Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 98942 invoked from network); 16 Feb 2009 15:48:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2009 15:48:59 -0000 Received: (qmail 94291 invoked by uid 500); 16 Feb 2009 15:48:48 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 94273 invoked by uid 500); 16 Feb 2009 15:48:48 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 94264 invoked by uid 99); 16 Feb 2009 15:48:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Feb 2009 07:48:48 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kogorman@gmail.com designates 209.85.146.179 as permitted sender) Received: from [209.85.146.179] (HELO wa-out-1112.google.com) (209.85.146.179) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Feb 2009 15:48:40 +0000 Received: by wa-out-1112.google.com with SMTP id j32so1327829waf.24 for ; Mon, 16 Feb 2009 07:48:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=UH/xN7QGD4VzbqshlW6SHiYOY1lv9DsZ0YK+i8Ll4KA=; b=S7iP2jzm2vLc96CsJ2G3lGW8G3iNT31PzhFzKEJsfv7atM6SbPbkr36Q73B3mdAiHL dMDfEOHYH/zBy+9CiM2Z1lFQzawYgJXMRLUiTpT+wTw/1HgmjUeSakGIh1M6fq4mrjDL 1zdtRKAV0KSIyJ/BXeYgGEsKUoQSvRU8BwK7o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=I1NG1qTX4S3rnLuMFghSpkJiS2P4g37xGa3ZirX6AEWulykPLsyE6maW1kgDgnMZBE J3QfvgFeImHb+Yq/Un7yQ4mtydahNTlFdYX5n5zLvBENuiXX9HkWxaFqYP3myqysHcBn KwRUySNThfXMeozZ6FDrtA7INR2lqYoANGJ1g= MIME-Version: 1.0 Received: by 10.115.91.2 with SMTP id t2mr2159010wal.224.1234799299362; Mon, 16 Feb 2009 07:48:19 -0800 (PST) In-Reply-To: References: <9acccfe50902151641p11836112l64aee4f99141c100@mail.gmail.com> <49991F8E.90806@ice-sa.com> Date: Mon, 16 Feb 2009 07:48:19 -0800 Message-ID: <9acccfe50902160748v282324a2madaea5f3129a28ef@mail.gmail.com> From: "Kevin O'Gorman" To: users@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] My apache server stopped doing CGI On Mon, Feb 16, 2009 at 3:12 AM, Bruno - e-comBR wro= te: > 2009/2/16 Andr=E9 Warnier : >> Kevin O'Gorman wrote: >> [...] >> You're not saying what version of Apache you are running, but you could = look >> up the "ScriptLog" directive. That will leave a larger log of what happ= ens >> when your script is called. >> Don't leave this activated in normal times, because it is very heavy on = the >> server (well, as long as the scripts are called of course). >> >> "Premature end of script headers" basically means "the script crashed". >> It could just mean - for instance - that the first line of the script (t= he >> "shebang" line) now points to some shell that no longer exists at that >> location. >> Could. >> >> >> --------------------------------------------------------------------- >> The official User-To-User support forum of the Apache HTTP Server Projec= t. >> See for more info. >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org >> " from the digest: users-digest-unsubscribe@httpd.apache.org >> For additional commands, e-mail: users-help@httpd.apache.org >> >> > > Do you have sure the permissions at /tmp is as it should be?? Maybe > it's wrong and making your script crash(segmentation fault). Instead, > try to simply write to stdout. > You may also run the script at the shell to test it. > > Simply try a bash script like this: > --- > #!/bin/bash > echo -e "Content-type: text/plain\r\n" > echo "It's a cool test" > export > --- > > []'s > Bruno Moreira Guedes > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP Server Project= . > See for more info. > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org > " from the digest: users-digest-unsubscribe@httpd.apache.org > For additional commands, e-mail: users-help@httpd.apache.org > > My script is up and running again. OS is gentoo Linux, running "stable" packages with weekly updates, so everything is as current as Gentoo stable gets. Apache is 2.2.10 Python is 2.5.2 The problem was in argument processing. An old old old piece of code that had never caused trouble was crashing without putting out that content= -type like Karel suggested. It looked like this: for arg in sys.argv[1:]: if arg=3D=3D'-D': DEBUG =3D not DEBUG else: sys.stdout.write("Unknown argument: %s\n" % arg) sys.exit(1) It should have output the content-type like all the other error tests in the code do. Somewhere along the line, apache must have started passing in one empty parameter. Or else python changed in some way. In any event, my script started to crash. I fixed up the error treatment and added a case for an empty string. The script now runs. Thanks, all. Another thread will start, because I'm getting odd things in the error log now, from this script that runs okay. --=20 Kevin O'Gorman, PhD --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org