PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > comp.info.servers.unix > Apache cgi problem
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.info.servers.unix Web servers for UNIX platforms.

Apache cgi problem

Réponse
 
LinkBack Outils de la discussion
Vieux 23/02/2005, 07h22   #1 (permalink)
TJ Walls
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Apache cgi problem

I have just installed OpenBSD on an old box that comes with Apache version
1.3.29. Running the basic server out of the box is fine. I can't get CGI
to work however.

I wrote the script recommended on the Apache web page called first.pl.

When I try to run this script through the server I get the following errors:
>[Tue Feb 22 22:18:42 2005] [error] (2)No such file or directory: exec of /cgi-bin/first.pl failed
>[Tue Feb 22 22:18:42 2005] [error] [client 192.168.0.107] Premature end of script headers: /cgi-bin/first.pl


The first is the source of the problem meaning that Apache cannot find the
perl interpreter for some reason. I know that perl is in /usr/bin/perl
(at least this is what `which perl` tells me) and I wrote the script
using vi on the BSD box, so the problem is not the trailing \CR.
In fact execution of
/var/www/cgi-bin/first.pl produces the desired output.

I saw some mention in a newsgroup that www should not have a UID or GID
below 500, so I changed them to no avail.

This is incredibly frustrating to not be able to do the most basic task.
Any or advice would be greatly appreciated. I know this question has
been posted a million times, so I appologize for asking it again, but I
have checked all the standard problems that I can find.

Sincerely,
TJ Walls

  Réponse avec citation
Vieux 23/02/2005, 19h17   #2 (permalink)
TJ Walls
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache cgi problem

> The first is the source of the problem meaning that Apache cannot find the
> perl interpreter for some reason. I know that perl is in /usr/bin/perl
> (at least this is what `which perl` tells me) and I wrote the script
> using vi on the BSD box, so the problem is not the trailing \CR.
> In fact execution of
> /var/www/cgi-bin/first.pl produces the desired output.
>


I found the solution, it is OpenBSD specific and I thought I would post it
here for posterity. The OpenBSD install (wisely) chroot(8) jails the Apache
webserver. So in /var/www (the ServerRoot, i.e. the jail) I had to create
a usr directory and copy all the files found by ldd `which perl`. I got
the basic script to run in the way.

Thanks,
TJ Walls
  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 06h23.


Édité par : vBulletin® version 3.7.2
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
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08629 seconds with 10 queries