httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <Owen.Bo...@swx.com>
Subject RE: [users@httpd] Ur attention plz
Date Wed, 09 Apr 2003 07:13:07 GMT
>-----Original Message-----
>From: palani saravanan [mailto:palani_saravanan@rediffmail.com]
>
>I am new to apache community.I am trying to execute a CGI script 
>using apache.I have a HTML file in var/www directory(I am using 
>debian Linux).
>The output will show u a Button.If i press the button the control 
>will pass to the helloworld.pl file which i placed in 
>usr/lib/cgi-bin directory.
>The code of my perl script is
>  #!/usr/bin/perl
>  print"Content-type: text/html\n\n";
>  print "<html>\n";
>  print "<head><title>Hello World !!!</title></head>\n";
>  print "<body>\n";
>  print "<h2>Hello World !!!</h2>\n";
>  print "</body>\n";
>  print "</html>\n";
>  exit;
>
>   Apache shows me a 500 internal server error.The errorlog file 
>says
>  2 errors.
>
>    1.Exec format error.execution of /usr/lib/helloworld.pl 
>failed

Just to be clear, can you confirm:

- your script is in /usr/lib?
- you have "ScriptAlias /cgi-bin /usr/lib" in httpd.conf?
- you are testing with http://server/cgi-bin/helloworld.pl ?

What happens if you try to execute the script from the command line,
i.e.

	# /usr/lib/helloworld.pl 

By the way, does debian linux put CGI scripts in /usr/lib? This can be
done, but it is not a good idea to put user files in a system directory.
Usually, you make a separate directory for CGIs under the user data area
(e.g. /home/fred/www/cgi-bin)...

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.  

>
>    2.Premature end of script headers.execution of 
>/usr/lib/helloworld.pl failed
>
>    Eventhough the second one is answered in FAQ i cud not get 
>it.
>I guess some configuration changes are needed in Apache's 
>configuration file.Plz help me to overcome  the problem.
>   Thanks in advance
>
>
>
>
>_______________________________________________________________________
>Odomos - the only  mosquito protection outside 4 walls -
>Click here to know more!
>http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.h
tm&&odomos&&wn


---------------------------------------------------------------------
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

This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please notify the sender urgently
and then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
You must not, directly or indirectly, use, disclose, distribute, print,
or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail
communications through their networks. Any views expressed in this
message are those of the individual sender, except where the message
states otherwise and the sender is authorised to state them to be the
views of the sender's company. 



---------------------------------------------------------------------
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