Perl 8 Exec Format Error
Contents |
Q&A Tutorials Poetry RecentThreads NewestNodes Donate What'sNew on Dec 03, 2010 at 08:31UTC ( #875104=perlquestion: print w/replies, xml ) Need Help?? anu_1 has asked for the wisdom of the Perl Monks concerning the following question: I am exec format error exec of cgi trying to open a new browser. #!/usr/bin/perl print "Content-type: text/html\n\n"; print ""; [download] test.html is in the same directory as the perl script. when the button ah01215: (8)exec format error is clicked. I get internal server error with following msg in the log Fri Dec 3 09:04:19 2010 error (8)Exec format error: exec of /mydir/tools/cgi-bin/test.html failed. Fri Dec 3 09:04:19 2010 ah01215: (8)exec format error: python error client 17.70.54.765 Premature end of script headers: /mydir/tools/cgi-bin/test.html Thanks for your helpComment on Exec format errorDownload Code Replies are listed 'Best First'. Re: Exec format error by Utilitarian (Vicar) on Dec 03, 2010 at 08:59UTC Your web server is configured to execute any files in the cgi-bin as a result when you call test.html the server attempts to execute it. Either change
(8)exec Format Error: Exec Of
your server settings to execute on the basis of extension (.cgi or .pl) or move test.html to your htdocs directory print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks." [reply][d/l] Re^2: Exec format error by Anonymous Monk on Dec 03, 2010 at 10:09UTC Judging by what's in the file, it looks like test.html is meant to be executed...[reply][d/l] Re^3: Exec format error by ikegami (Pope) on Dec 03, 2010 at 16:35UTC What he showed isn't test.html. "test.html is in the same directory as the perl script." [reply] Re^2: Exec format error by anu_1 (Acolyte) on Dec 03, 2010 at 10:19UTC I have updated (AddHandler) the Apache httpd.conf to execute only .pl
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack
Exec Format Error Cgi-bin
Overflow the company Business Learn more about hiring developers or posting ads with us malformed header from script Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community end of script output before headers python of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Unable to get this simple Perl CGI program running up vote 0 down vote favorite 1 http://www.perlmonks.org/?node_id=875104 Can someone please explain to me the very basics of getting perl to work on a server. Do I need a module on the server? If so where does it go? What do I name my files and where do they go? From my understanding you need a module and it goes in the cgi-bin. I can't get a clear answer whether I name the file .pl or .cgi and when I http://stackoverflow.com/questions/12666361/unable-to-get-this-simple-perl-cgi-program-running put it in the cgi-bin I am getting a server error. I also have my permissions set to 777, so that shouldn't be the problem. Please help! I just want to understand the how to get the very basic program working such as the one below. Thanks in advance! #!/usr/bin/perl require("cgi-lib.pl"); print &PrintHeader; print ""; print "
Hello world!
"; print ""; print ""; perl cgi cgi-bin share|improve this question edited Oct 1 '12 at 1:43 Andy Lester 51k1166121 asked Oct 1 '12 at 0:40 SilverNightaFall 1,30962342 Did you put cgi-lib.pl in the same directory and with the same permissions? What error do you get? What is written in the server logs? –epsalon Oct 1 '12 at 0:45 I am getting (8)Exec format error: exec of 'home/site/cgi-bin/simple.pl' failed and Premature end of script headers: simple.pl –SilverNightaFall Oct 1 '12 at 0:50 and yes I have cgi-lib.pl in the cgi-bin folder –SilverNightaFall Oct 1 '12 at 0:52 5 cgi-lib.pl is from back in the perl 4 days, almost 20 years ago. Can I ask what instructions you are following that mentioned it? –ysth Oct 1 '12 at 1:07 Whatever instructions you're following that suggest you use cgi-lib.pl should be thrownhere for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more http://stackoverflow.com/questions/24864736/executing-perl-script-in-linux-gives-exec-format-error-wrong-architecture about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Executing perl script in linux gives :Exec format error. Wrong Architecture up vote 1 down vote favorite i have perl script that used to be working great exec format , once i edit it in windows and convert it to UTF-8 and then via FTP return it . also did: chmod +x foo.pl and then when i try to run it : ./foo.pl im getting this error: ./foo.pl: Exec format error. Wrong Architecture. what ? what wrong Architecture ? whats going on here ? linux perl share|improve this question asked Jul 21 '14 at 12:07 user63898 8,94741169338 5 What does the first line of the exec format error script look like? –Quentin Jul 21 '14 at 12:09 Looks like you use binaries that are not compiled for your OS. –Jens Jul 21 '14 at 12:12 no binaries at all.. this script just doing string manipulation on files its 200 lines script –user63898 Jul 21 '14 at 12:14 64bit Perl on a 32bit OS? –Leeft Jul 21 '14 at 15:14 Did you ever run the file on windows? If so you probably changed the first line to point to a different path for where perl is installed. That could be causing the error. –jkeuhlen Jul 22 '14 at 20:56 add a comment| active oldest votes Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook. Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Browse other questions tagged linux perl or ask your own question. asked 2 years ago viewed 950 times Related 21How can I get name of the user executing my Perl script?3Why do I get “Error 6060” when I try to use DBD::Advantage with a