httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hasanuddin Tamir <...@trabas.com>
Subject Re: cgi question
Date Tue, 09 Apr 2002 20:10:59 GMT
On Tue, 9 Apr 2002, Admin <kompukit@naisp.net> wrote,

> very good...THAT was going to be my next statement...as to what the error was...
> thats why I asked to see the script (itself) and his httpd.conf files.
> I suspected as that might be the problem.

Actually, Owen has spotted the problem and suggested correction.
I only followed his suggestion, which is right from the start.


-- 
san->http(www.trabas.com)
{If Linux doesn't have solution, you have the wrong problem}


> Hasanuddin Tamir wrote:
>
> > On Tue, 9 Apr 2002, Admin <kompukit@naisp.net> wrote,
> >
> > > and thats why I also respoded in this way...
> > >
> > > 8)Exec format error:  < this tells me...that what I said about the space
being
> > > inserted, (due to html editors etc)  could be the problem...I've had that happen
to me
> > > on numerous occaisions....finally resorted to using either notepad, or a wonderful
> > > free html editor called Arachnophilia
> > >
> > > in a previous email/post...I also suggested that perhaps his permissions were
incorrect
> >
> > Frankly, this is the first time I know there's such error, "Exec format
> > error".  I think I know what kind of error I would encounter should the
> > problem had something to do with configuration, so I did a little
> > experience.
> >
> > First, I created a little script called hello.cgi.
> >
> >     $ cat hello.cgi
> >     #!/usr/bin/perl
> >
> >     print "Content-type: text/html\n\n",
> >     "hello, world\n";
> >
> >     $ ./hello.cgi
> >     Content-type: text/html
> >
> >     hello, world
> >
> > I accessed the URL http://localhost/cgi-bin/hello.cgi and my browser
> > displayed the same content as expected. I then took away the # character
> > from the first line, and now I got internal server error. And the error log
> > says,
> >
> >     [Tue Apr  9 22:40:29 2002] [error] (8)Exec format error: exec of
> >     /usr/local/apache/cgi-bin/hello.cgi failed
> >
> > Btw, I hear somebody writes perl script with html editor and that causes
> > misplaced space?
> >
> > --
> > san->http(www.trabas.com)
> > {If Linux doesn't have solution, you have the wrong problem}
> >
> > >
> > > Owen Boyle wrote:
> > >
> > > > Admin wrote:
> > > > >
> > > > > yes...it's odd...only if you have failed to add the handler/ext "
.pl " to that line
> > > > > DUHHHHH   and THATS exactly why...he is getting the error...
> > > > > look again at the extension on the filename...it is:  "cart.pl"
> > > > > not cart.cgi
> > > >
> > > > Look at the error message. This is not what happens if you make the
> > > > mistake you are describing.
> > > >
> > > > > [Tue Apr  9 08:42:50 2002] [error] (8)Exec format error: exec of
> > > > > /var/www/html/snowbankih/cgi-bin/ihcparts/cart.pl failed
> > > >
> > > > As I stated in a direct reply, this is caused bby a faulty shebang line
> > > > trapping a system error.
> > > >
> > > > If you request a file which is supposed to be a CGI but you haven't
> > > > defined it as a CGI with AddHandler or ScriptAlias, apache will assume
> > > > it is a plain file and simply serve it so the client will just get the
> > > > perl script in his browser. You will not get an "Exec format error".
> > > >
> > > > There's no need to get all hot under the collar - we're all trying to
> > > > help one another here!
> > > >
> > > > Rgds,
> > > >
> > > > Owen Boyle.
> > > >
> > > > ---------------------------------------------------------------------
> > > > The official User-To-User support forum of the Apache HTTP Server Project.
> > > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> > > --
> > > <******** http://www.myispnet.net ********>
> > > Admin -  My ISP Network
> > > admin@myispnet.net
> > > ICQ# 7110071
> > > MSN Messenger= myispnet@hotmail.com
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP Server Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
>
> --
> <******** http://www.myispnet.net ********>
> Admin -  My ISP Network
> admin@myispnet.net
> ICQ# 7110071
> MSN Messenger= myispnet@hotmail.com
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message