Bug#444048: apache2: CGI scripts entirely broken

2007-12-23 Thread Tollef Fog Heen
* "Nick Price" | And in case it was missed, in my public_html directory there is a .htaccess | file which contains the following: | addhandler cgi-script .pl Do you have Options ExecCGI for your cgi-bin directory too? -- Tollef Fog Heen UNIX is user friendly, it's just picky about who its frie

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Stefan Fritsch
On Tuesday 25 September 2007, Ralf Mattes wrote: > Ok, I had a closer look at your script - as others already > mentioned: HTTP headers end with Carriage-Return,Newline. They are CGI headers, not HTTP headers. AFAIK the CGI spec allows simple \n as line endings. > If I test > locally with your

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Nick Price
[EMAIL PROTECTED]:~# strace -f /etc/init.d/apache2 start 2>&1 |fgrep test.pl [pid 18057] read(19, "GET /cgi-bin/test.pl HTTP/1.1\r\nH"..., 8000) = 422 [pid 18056] read(19, "GET /cgi-bin/test.pl HTTP/1.1\r\nH"..., 8000) = 418 [pid 18056] stat64("/home/nick/public_html/cgi-bin/test.pl", {st_mode=S_IF

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Nick Price
As mentioned earlier, i did try with \r\n\r\n and got the same problem. On 9/25/07, Ralf Mattes <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-09-25 at 14:42 -0700, Nick Price wrote: > > It does actually begin with #!/usr/bin/perl -w and then the single > > line of code. I wasn't sure what you meant

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Stefan Fritsch
On Tuesday 25 September 2007, Nick Price wrote: > I had 755 set, but I tried 777 as well on the scripts. > As for the directory, it is physically located under my public_html > directory in my ~, and I use .htaccess with addhandler cgi-script > .pl As user www-data i can execute the script. Try st

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Ralf Mattes
On Tue, 2007-09-25 at 14:42 -0700, Nick Price wrote: > It does actually begin with #!/usr/bin/perl -w and then the single > line of code. I wasn't sure what you meant. > > [EMAIL PROTECTED]:~$ env -i LANG=C PATH=/usr/local/bin:/bin ./test.pl > Content-type: text/html > > [EMAIL PROTECTED]:~$ >

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Nick Price
It does actually begin with #!/usr/bin/perl -w and then the single line of code. I wasn't sure what you meant. [EMAIL PROTECTED]:~$ env -i LANG=C PATH=/usr/local/bin:/bin ./test.pl Content-type: text/html [EMAIL PROTECTED]:~$ To invoke the script via commandline earlier, I did the same thing wi

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Ralf Mattes
On Tue, 2007-09-25 at 13:36 -0700, Nick Price wrote: > That script I pasted, as well as the latest version of awstats > (http://awstats.sourceforge.net/), and uber-uploader > (http://uber-uploader.sourceforge.net/) You mean your script looks like this: *---

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Nick Price
I had 755 set, but I tried 777 as well on the scripts. As for the directory, it is physically located under my public_html directory in my ~, and I use .htaccess with addhandler cgi-script .pl As user www-data i can execute the script. Scriptlog doesn't give me anything we didn't already know: %%

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Stefan Fritsch
On Tuesday 25 September 2007, Nick Price wrote: > I've tried with several known-good scripts as well, and with > \r\n\r\n and still nothing. The permissions are correct on the > script and I am not using suexec. > > Any ideas? Give more information, e.g. what exactly are the permissions of the s

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Nick Price
That script I pasted, as well as the latest version of awstats ( http://awstats.sourceforge.net/), and uber-uploader ( http://uber-uploader.sourceforge.net/) They were all working just fine until after an apt-get upgrade, I didn't catch which version of apache was previously running, unfortunately

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Ralf Mattes
On Tue, 2007-09-25 at 13:08 -0700, Nick Price wrote: > I've tried with several known-good scripts as well, and with \r\n\r\n > and still nothing. The permissions are correct on the script and I am > not using suexec. > > Any ideas? Yes, many. But you might help us by providing the _exact_ script

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Nick Price
I've tried with several known-good scripts as well, and with \r\n\r\n and still nothing. The permissions are correct on the script and I am not using suexec. Any ideas? On 9/25/07, martin f krafft <[EMAIL PROTECTED]> wrote: > > also sprach Nick Price <[EMAIL PROTECTED]> [2007.09.25.1918 +0100]:

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread martin f krafft
also sprach Nick Price <[EMAIL PROTECTED]> [2007.09.25.1918 +0100]: > I have a perl script that is simply > print "Content-type: text/html\n\n"; I believe this has to be \r\n\r\n. -- .''`. martin f. krafft <[EMAIL PROTECTED]> : :' : proud Debian developer, author, administrator, and user `

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Stefan Fritsch
On Tuesday 25 September 2007, Nick Price wrote: > I have a perl script that is simply > print "Content-type: text/html\n\n"; > > When run from the commandline it executes perfectly, > when run through apache2's CGI handler it gives a 500 > through a browser, and the following message in the > error

Bug#444048: apache2: CGI scripts entirely broken

2007-09-25 Thread Nick Price
Package: apache2 Version: 2.2.6-1 Severity: important I have a perl script that is simply print "Content-type: text/html\n\n"; When run from the commandline it executes perfectly, when run through apache2's CGI handler it gives a 500 through a browser, and the following message in the error