Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Bug#444048: apache2: CGI scripts entirely broken

From: Nick Price <nprice(at)q-cat.com>
Date: Tue Sep 25 2007 - 18:15:08 EDT

root@rofl:~# 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_IFREG|0777, st_size=60, ...}) = 0 [pid 18056] open("/home/nick/public_html/cgi-bin/test.pl/.htaccess", O_RDONLY|O_LARGEFILE) = -1 ENOTDIR (Not a directory)

as for how the site points, here is how it's handled (i've replaced my IP and domain for security reasons):

<Virtualhost 0.0.0.0>
ServerName domain.com
ServerAlias domain.com
DocumentRoot /home/nick/public_html

CustomLog     /home/nick/access_log combined
ScriptLog     /home/nick/script_log

</VirtualHost>

And in case it was missed, in my public_html directory there is a .htaccess file which contains the following:
addhandler cgi-script .pl

On 9/25/07, Stefan Fritsch <sf@sfritsch.de> wrote:
>
> 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 starting apache with
>
> strace -f /etc/init.d/apache2 start 2>&1 |fgrep test.pl
>
> (test.pl being the name of your script, of course) and do the request.
> What ist the output? You might have to install the package strace
> first, and you will have to kill apache from a different shell after
> the test.
>
> > Scriptlog doesn't give me anything we didn't already know:
> >
> > %% [Tue Sep 25 15:58:57 2007] GET /cgi-bin/test.pl HTTP/1.1
> > %% 500 /home/nick/public_html/cgi-bin/test.pl
>
> This is strange, the request does not contain ~nick.
> Is /cgi-bin/test.pl the request you do in the browser? How is it
> mapped to /home/nick/public_html/cgi-bin/test.pl ?
>
> Cheers,
> Stefan
>

-- 
To UNSUBSCRIBE, email to debian-apache-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Tue Sep 25 18:21:48 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 07:57:52 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library