Apache CGI/Perl script execution problem

Apache CGI/Perl script execution problem

Post by Proac » Tue, 11 Nov 1997 04:00:00



I'm not sure if this question is appropriate for this area, but I hope someone
 can help me anyway.

My Apache is not executing any Perl or CGI script properly.  For example, when
 I point a browser to 'http://localhost/cgi-bin/test-cgi' It prints out the
 whole script(like if I was viewing using the 'more test-cgi' command), instead
 of displaying the intended result of the script.

Can someone explain to me as to what is happening?  How can I fix this?

Thanks in advance.

 
 
 

Apache CGI/Perl script execution problem

Post by Hannu Nevalaine » Wed, 12 Nov 1997 04:00:00


On 10-Nov-97 22:43:08

Quote:>I'm not sure if this question is appropriate for this area, but I hope
>someone
> can help me anyway.
>My Apache is not executing any Perl or CGI script properly.  For example,
>when
> I point a browser to 'http://localhost/cgi-bin/test-cgi' It prints out the
> whole script(like if I was viewing using the 'more test-cgi' command),
> instead of displaying the intended result of the script.
>Can someone explain to me as to what is happening?

 Your Apache setup obviously doesn't _execute_ the script. It merely hands it
over to the browser as a text or html file.

Quote:>  How can I fix this?

1)
 #!/bin/perl

 Do you have that as first line in the script?

2)
 $ chmod a+rx yourscript.pl

 Have you done that?

Hannu E.K.Nevalainen            ,-.     _   ,-.    _ // (no warez ofcoz'!)

--
Internet acronyms: SNAFU     Situation normal, all f***ed up.

 
 
 

Apache CGI/Perl script execution problem

Post by Jamie Hoglun » Thu, 13 Nov 1997 04:00:00


: I'm not sure if this question is appropriate for this area, but I hope someone
:  can help me anyway.

: My Apache is not executing any Perl or CGI script properly.  For example, when
:  I point a browser to 'http://localhost/cgi-bin/test-cgi' It prints out the
:  whole script(like if I was viewing using the 'more test-cgi' command), instead
:  of displaying the intended result of the script.

: Can someone explain to me as to what is happening?  How can I fix this?

Sounds to me like your apache's cgi-bin isn't configured properly.

If the permissions aren't set (chmod +x whatever.cgi) then it should
return a permission denied error.

Look in your apache's configuration file.

Actually, this isn't the right newsgroup, one of the www newsgroups would
probably be better.

Jamie

 
 
 

1. Apache 0.6.5 problems with perl cgi scripts

I am having an incredibly bizarre problem with Apache 0.6.5. I have
two apache servers running on different ports for testing things
out. This is on a DEC Alpha running OSF/1 v3.0. I keep getting a 500
Server Error from all the perl scripts that I try. I have tried my own
stuff, I have tried other peoples stuff it doesn't matter. What is
very very odd is that the script will work the very first time I have
it setup. However, subsequent attempts fail with the 500 Server
Error. I have tracked the error from the error logs back to
http_mime.c and the following code:

/* why did this use getline, when we can use stdio buffered I/O?? */
/* maybe we should put a timeout on this. */
          if (fgets(w, MAX_STRING_LEN-1, f) == NULL) {
           sprintf(w,"httpd: (1) malformed header from script %s",path);  
           die(SERVER_ERROR,w,fd);
       }
       p = strlen(w);
       if (p > 0 && w[p-1] == '\n')

Does anyone have a clue what it is going on here?

Matt

2. Anyone build Mozilla lately?

3. Execution of CGI scripts in Apache

4. libXmu documentation

5. apache setup/enabling execution of cgi scripts

6. Gnome: Help Needed

7. sigsegv by process started via bourne shell by perl cgi script on apache

8. Sparc- adding tape drive problem

9. coherence perl-cgi-script / apache / ressources

10. Redirect cgi (perl) scripts using Apache 0.8.14

11. Perl CGI scripts: Apache OK, NES FAILED.

12. CGI script execution in SSL problem

13. Perl CGI scripts on Windows Apache