End of script output before headers – No such file or directory: exec of

 

[Wed Jul 19 16:08:45.679229 2017] [cgi:error] [pid 2954] [client 94.63.xxx.xxx:12439] End of script output before headers:4KUYWRBjpMFod9i.cgi
[Wed Jul 19 16:09:05.030839 2017] [cgi:error] [pid 783] [client 94.63.xxx.xxx:37260] AH01215: (2)No such file or directory: exec of ‘/home/webroot/nasamos.com/www/cgi-bin/x9uWvwAREeUkQn5p/4KUYWRBjpMFod9i.cgi’ failed

Well!,
I saw a few blog posts and forum threads about this issue, but NONE was able to help me….

Yah!, syntax was okay….

perl -c 4KUYWRBjpMFod9i.cgi
4KUYWRBjpMFod9i.cgi syntax OK

I’v created a brand new file on /cgi-bin/ with some dummy filename and pumped a simple perl script on it…

#!/usr/bin/perl
# hello.pl -- my first perl script!
print "Content-type: text/html\n\n";
print "Hello, world!\n";

I was able to run it successfully, so…. the issue wasn’t on the CGI/PERL/APACHE/FIREWALL/SUEXEC.
I guess that the 4KUYWRBjpMFod9i.cgi had some issue… even using file -i  it looked to be okay… I’v decided to copy the content of 4KUYWRBjpMFod9i.cgi to the new dummy cgi file … and it worked….

I guess that the issue was on the encoding of the original cgi…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.