PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > Exec format error
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

Exec format error

Réponse
 
LinkBack Outils de la discussion
Vieux 05/06/2007, 16h31   #1
vivekian
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Exec format error

Hi,

After setting up Fedora Core 7 on my machine, ran apache with its
default configuration.
Somehow can't get the cgi scripts to run. The error_log file indicates
the following error :

Tue Jun 05 10:02:36 2007] [error] [client 127.0.0.1] (8)Exec format
error: exec of '/var/www/cgi-bin/route.cgi' failed
[Tue Jun 05 10:02:36 2007] [error] [client 127.0.0.1] Premature end of
script headers: route.cgi

This script runs fine on the command interpreter and has worked fine
previously with other . The permissions seem to be okay. Read and
Execute access is granted to Group and Others for files within the cgi-
bin directory. Is there anything else i should be looking out for ?
The script is given below :

#!/usr/bin/perl -w

use strict;
use CGI;

my $ROUTE = 'cat /proc/net/route';
my $q = new CGI;
local *PIPE ;
open PIPE, "$ROUTE |" ;
print "Content-type: text/plain\n\n";
print while <PIPE> ;
close PIPE;

These are the relavant portions of the httpd.conf file

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

  Réponse avec citation
Vieux 05/06/2007, 17h01   #2
Mark Taylor
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Exec format error

vivekian <viveklinux@gmail.com> wrote in news:1181057477.564127.17180
@g4g2000hsf.googlegroups.com:

> Hi,
>
> After setting up Fedora Core 7 on my machine, ran apache with its
> default configuration.
> Somehow can't get the cgi scripts to run. The error_log file indicates
> the following error :
>
> Tue Jun 05 10:02:36 2007] [error] [client 127.0.0.1] (8)Exec format
> error: exec of '/var/www/cgi-bin/route.cgi' failed
> [Tue Jun 05 10:02:36 2007] [error] [client 127.0.0.1] Premature end of
> script headers: route.cgi
>
> This script runs fine on the command interpreter and has worked fine
> previously with other . The permissions seem to be okay. Read and
> Execute access is granted to Group and Others for files within the cgi-
> bin directory. Is there anything else i should be looking out for ?
> The script is given below :
>
> #!/usr/bin/perl -w
>
> use strict;
> use CGI;
>
> my $ROUTE = 'cat /proc/net/route';
> my $q = new CGI;
> local *PIPE ;
> open PIPE, "$ROUTE |" ;
> print "Content-type: text/plain\n\n";
> print while <PIPE> ;
> close PIPE;
>
> These are the relavant portions of the httpd.conf file
>
> ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
>
> #
> # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
> # CGI directory exists, if you have that configured.
> #
> <Directory "/var/www/cgi-bin">
> AllowOverride None
> Options None
> Order allow,deny
> Allow from all
> </Directory>
>
>


Somewhere there needs to be an:

Options ExecCgi


Have you tried that, or even a simple "hello world" script instead a
complex script?



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
  Réponse avec citation
Vieux 05/06/2007, 21h58   #3
vivekian
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Exec format error

On Jun 5, 11:01 am, Mark Taylor <mtayl...@xlrim.com> wrote:
> vivekian <vivekli...@gmail.com> wrote in news:1181057477.564127.17180
> @g4g2000hsf.googlegroups.com:
>
>
>
> > Hi,

>
> > After setting up Fedora Core 7 on my machine, ran apache with its
> > default configuration.
> > Somehow can't get the cgi scripts to run. The error_log file indicates
> > the following error :

>
> > Tue Jun 05 10:02:36 2007] [error] [client 127.0.0.1] (8)Exec format
> > error: exec of '/var/www/cgi-bin/route.cgi' failed
> > [Tue Jun 05 10:02:36 2007] [error] [client 127.0.0.1] Premature end of
> > script headers: route.cgi

>
> > This script runs fine on the command interpreter and has worked fine
> > previously with other . The permissions seem to be okay. Read and
> > Execute access is granted to Group and Others for files within the cgi-
> > bin directory. Is there anything else i should be looking out for ?
> > The script is given below :

>
> > #!/usr/bin/perl -w

>
> > use strict;
> > use CGI;

>
> > my $ROUTE = 'cat /proc/net/route';
> > my $q = new CGI;
> > local *PIPE ;
> > open PIPE, "$ROUTE |" ;
> > print "Content-type: text/plain\n\n";
> > print while <PIPE> ;
> > close PIPE;

>
> > These are the relavant portions of the httpd.conf file

>
> > ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

>
> > #
> > # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
> > # CGI directory exists, if you have that configured.
> > #
> > <Directory "/var/www/cgi-bin">
> > AllowOverride None
> > Options None
> > Order allow,deny
> > Allow from all
> > </Directory>

>
> Somewhere there needs to be an:
>
> Options ExecCgi
>
> Have you tried that, or even a simple "hello world" script instead a
> complex script?
>


It worked with a simpler script. Don't think the server had
permissions to execute to read the route file.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 21h21.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12178 seconds with 11 queries