scohttp80 will not execute scripts in cgi-bin

scohttp80 will not execute scripts in cgi-bin

Post by Lucky Leavel » Fri, 17 Jan 1997 04:00:00



I followed the instructions in the TA script entitled

        How to use scohttp as a World Wide Web server

to configure scohttp80.  I tested it using Lynx 2.4 (from Skunkware 5 CD)
to attempt execution of a simple script file called "test":

        lynx http://ris.ris.com/cgi-bin/test

where test contains a "ls -l" command and has permissions set to 777.

I get the following error:

        500 SERVER ERROR

        The server encountered an internal error and was unable to
        complete your request.

I can use Lynx to access HTML files just fine.

The /var/scohttp80/logs startup_errors log contains the following lines:

        httpd: exec of /var/scohttp80/cgi-bin/test failed, errno is 8.

The corresponding line in the access_log is

        ... "GET /cgi-bin/test HTTP/1.0" 500 0

Got any ideas as to what I missed and how to remedy the situation?

Thank you,
Lucky

Lucky Leavell                      Phone: (800) 481-2393  or  (812) 945-6555
UniXpress - Your Source for SCO      FAX: (812) 949-9233

New Albany, IN 47150-2013                 71534,2674 (CompuServe)
WWW Home Page:  http://www.UniXpress.com   ftp://www.iglou.com/members/ris
Ask about special Lone-Tar/SarCheck Bundle simplifying Backups and Tuning

 
 
 

scohttp80 will not execute scripts in cgi-bin

Post by Bela Lubki » Sat, 18 Jan 1997 04:00:00



> I followed the instructions in the TA script entitled

>    How to use scohttp as a World Wide Web server

You must have missed the subtitle "how to put together the worst
available WWW server for your system".

Install a usable WWW server: NCSA, CERN, Apache, Roxen, buy the
commercial Netscape servers from SCO, or whatever.

Quote:> to configure scohttp80.  I tested it using Lynx 2.4 (from Skunkware 5 CD)
> to attempt execution of a simple script file called "test":

>    lynx http://ris.ris.com/cgi-bin/test

> where test contains a "ls -l" command and has permissions set to 777.

> I get the following error:

>    500 SERVER ERROR

>    The server encountered an internal error and was unable to
>    complete your request.

> I can use Lynx to access HTML files just fine.

> The /var/scohttp80/logs startup_errors log contains the following lines:

>    httpd: exec of /var/scohttp80/cgi-bin/test failed, errno is 8.

> The corresponding line in the access_log is

>    ... "GET /cgi-bin/test HTTP/1.0" 500 0

> Got any ideas as to what I missed and how to remedy the situation?

Errno 8 is ENOEXEC, "Exec format error".  Presumably you just put "ls
-l" in the file.  The server is trying to do a binary exec on the file;
it must be something that the kernel can recognize as an executable.  So
add "#!/bin/sh" at the top.

Then it'll work, but you'll still have an old, slow, flaky, suck WWW
server.  And you may also have broken your man page access, too.

- Show quoted text -

Quote:>Bela<


 
 
 

scohttp80 will not execute scripts in cgi-bin

Post by Lucky Leavel » Sat, 18 Jan 1997 04:00:00




> > I followed the instructions in the TA script entitled

> >       How to use scohttp as a World Wide Web server

> You must have missed the subtitle "how to put together the worst
> available WWW server for your system".

Ok,ok, I got the hint and have been working on Apache 1.0.5

Quote:> Install a usable WWW server: NCSA, CERN, Apache, Roxen, buy the
> commercial Netscape servers from SCO, or whatever.

> Errno 8 is ENOEXEC, "Exec format error".  Presumably you just put "ls
> -l" in the file.  The server is trying to do a binary exec on the file;
> it must be something that the kernel can recognize as an executable.  So
> add "#!/bin/sh" at the top.

Good point, but I have a similar problem with Apache now! (COuld this be
communicable!

The Apache access_log had line similar to

        ... "GET /cgi-bin/test-cgi HTTP/1.0" 200 581

on a script which executes just fine from within the cgi-bin directory.

Lynx exits but what remains on the screen is a status line

        scoedit -r /tmp/L49100.html

followed by the error message

        lynx: Start file could not be found or is not text/html or
              text/plain

        Exiting ...

The test-cgi file is executable, begins with #!/bin/sh and  and echoes
"Contect type: text/plain" as its first line ...

Quote:> Then it'll work, but you'll still have an old, slow, flaky, suck WWW
> server.  And you may also have broken your man page access, too.

Oh well, I DO still have man page access;  slow (probably due to inclusion
of /usr/skunk/man ..) but still very alive and well.

Got any ideas?

Thank you,
Lucky

Lucky Leavell                      Phone: (800) 481-2393  or  (812) 945-6555
UniXpress - Your Source for SCO      FAX: (812) 949-9233

New Albany, IN 47150-2013                 71534,2674 (CompuServe)
WWW Home Page:  http://www.UniXpress.com   ftp://www.iglou.com/members/ris
Ask about special Lone-Tar/SarCheck Bundle simplifying Backups and Tuning

 
 
 

scohttp80 will not execute scripts in cgi-bin

Post by Bill Vermilli » Sat, 18 Jan 1997 04:00:00






>> Errno 8 is ENOEXEC, "Exec format error".  Presumably you just put "ls
>> -l" in the file.  The server is trying to do a binary exec on the file;
>> it must be something that the kernel can recognize as an executable.  So
>> add "#!/bin/sh" at the top.
>Good point, but I have a similar problem with Apache now! (COuld this be
>communicable!
>The Apache access_log had line similar to

>    ... "GET /cgi-bin/test-cgi HTTP/1.0" 200 581
>on a script which executes just fine from within the cgi-bin directory.

I may be way out of line here as I'm not using Apache, but on
the Netscape Communications and Commerce servers I've used I
had to specifically enable cgi-bin, and point to the proper
directory.

Another thing to look for (that I've found in some HTML scripts
from people who had problems getting their apps to work on the
server) is incorrectly coded paths to the cgi-bin - eg wrong
hard-coded paths or wrong relative paths.

Again this was on Netscape servers but I have seen similar
errors.

--