LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-13-2009, 01:27 PM   #1
Jane2008
Member
 
Registered: Oct 2008
Posts: 36

Rep: Reputation: 15
cgi: exec format error


Hello, I tried to run a binary cgi in the /var/www/archive/cgi directory. The permission is already set to 777 and a simple perl program works well in this directory. But it fails when run this binary cgi. The error in error.log is
(8)Exec format error: exec of '/var/www/archive/cgi/ArchiveDataServer.cgi' failed
Premature end of script headers: ArchiveDataServer.cgi, referer: http://localhost/archive/cgi/

The error in web browser is:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.

Thanks.
 
Old 08-13-2009, 11:12 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Are cgi handlers enabled for your file type?

eg
Code:
AddHandler cgi-script .cgi
Is the archive/cgi directory covered by an ExecCGI declaration?

eg
Code:
<Directory "/var/www/archive/cgi">
    Options ExecCGI
</Directory>

Last edited by neonsignal; 08-13-2009 at 11:15 PM.
 
Old 08-14-2009, 10:10 AM   #3
Jane2008
Member
 
Registered: Oct 2008
Posts: 36

Original Poster
Rep: Reputation: 15
Yes. The AddHandler and Options are already added in apache2.conf.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chroot: cannot execute /bin/sh: Exec format error jnojr Linux - General 8 06-24-2012 01:52 AM
chroot: cannot run command `/bin/bash': Exec format error snakeo2 Linux - Newbie 6 09-28-2010 04:41 AM
Exec format error. binary file not executable. kaz2100 Linux - General 2 08-19-2006 06:26 PM
exec cmd=perl... work but exec cgi doenst crions Slackware 5 12-09-2005 01:17 PM
MDK 9.1 Fatal Error in Stage 1: Exec Format Error Beano Mandriva 5 09-12-2004 04:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration