Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 68104 invoked from network); 7 Mar 2004 19:50:24 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 7 Mar 2004 19:50:24 -0000 Received: (qmail 79654 invoked by uid 500); 7 Mar 2004 19:49:57 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 79640 invoked by uid 500); 7 Mar 2004 19:49:57 -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: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 79621 invoked from network); 7 Mar 2004 19:49:57 -0000 Received: from unknown (HELO eeyore.vdwaal.home) (62.166.29.194) by daedalus.apache.org with SMTP; 7 Mar 2004 19:49:57 -0000 Received: from 62.166.29.194 (localhost [127.0.0.1]) by eeyore.vdwaal.home (8.12.3/8.12.3/Debian-6.6) with SMTP id i27Jnx7T007261 for ; Sun, 7 Mar 2004 20:49:59 +0100 Received: from 10.0.0.158 (SquirrelMail authenticated user hjw) by 62.166.29.194 with HTTP; Sun, 7 Mar 2004 20:49:59 +0100 (CET) Message-ID: <1135.10.0.0.158.1078688999.squirrel@62.166.29.194> In-Reply-To: <404B2D77.5030202@zync.co.uk> References: <3462.10.0.0.158.1078588037.squirrel@62.166.29.194> <404B2D77.5030202@zync.co.uk> Date: Sun, 7 Mar 2004 20:49:59 +0100 (CET) From: "Hendrik-Jan van der Waal" To: users@httpd.apache.org Reply-To: h@vdwaal.net User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: Re: [users@httpd] Scripts cannot be executes X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > Hendrik-Jan van der Waal wrote: >> LS. >> >> I'll keep this short because I'm not sure if this is the right place. >> >> My site (www.pick.nl) uses a lot of perl scripts. Every now en than >> users >> get an internal server error. In the error log of apache, which I got >> from >> my ISP, the internal server error is a result of a premature end of >> headers, which is caused bij a memory allocation error (Can not exec >> scriptname.cgi) >> >> My ISP doesn't know why the error occurs, there is enough memory. Is >> there >> any one who recognizes this problem. Is this a configuration problem or >> are my scripts faulty? > > The usual cause of this error is line end characters. When the cgi is > uploaded, there are a variety of reasons why the file could end up on > the (Unix) server with CRLF line terminators (CR == carriage return == > ascii char 13 == Ctrl+M == ^M). The shebang line ends up being: > > #!/usr/bin/perl^M > > There is unfortunately no file called /usr/bin/perl^M on unix systems, > just one called /usr/bin/perl. This is why the exec fails. Fortunately > the fix is easy. You can: > > Either > 1) Specify the shebang line as "#!/usr/bin/perl -w" - this pushes the > spurious ^M to after the -w so that the name of the perl executable is > preserved. (not recommended) > Or > 2) Edit the file once it is on the server and save it in unix format (LF > line terminators), or use dos2unix (very tedious and easy to forget) > Or > 3) Sort out your Windows editing and ftp programs so that the LF line > terminators are preserved during editing and transfer (the "right" way) > Or > 4) Stop using Windoze. (recommended - YMMV ;-) ) > > HTH > Rich > > > --------------------------------------------------------------------- > 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 > > This is not the problem. The script works fine 90% of the time. It has something todo with the amount of memory availeble for the httpd. For your info, my main workstation is running on Suse, I�ve a debian server and my favorite editor is vi(m). Thank you very much for the suggestions. Hendrik-Jan --------------------------------------------------------------------- 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