httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: [users@httpd] Default Index File as CGI script
Date Thu, 11 Sep 2003 19:37:04 GMT

On Thu, 11 Sep 2003, Brian Leader wrote:

> OK, some progress I think.
>
> I changed the permission of the fake404.cgi file to 755.  It still gives
> the same error in the browser, but now in the error log I get:
>
> [error] (8)Exec format error: exec of /var/www/cgi-bin/fake404.cgi failed

Don't bother running it from apache until it works from the command line.

>
> When I run it from the command line I get:
>
> : No such file or directory
> : command not found
> Content-Type: text/html
> Status: 404 Not Found
>
> <!DOCTYPE HTML PUBLIC -//IETF//DTD HTML 2.0//EN>

> Perhaps it is related to the first line of the file?
>
> !/bin/sh

Yes.  It would be very unusual to have a unix system without a functioning
/bin/sh, but it appears that you might have one.  What happens when you
simply type "/bin/sh"?

In any case, the script will probably run if you simply remove the first
line.

Joshua.

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message