I am working in Ubuntu 10.10 (Maverick Meerkat) and running my CGI script under Apache, but it is showing me the following error...
[Sat errorNo such file or directory: exec of '/usr/lib/cgi-bin/fst.cgi' failed [Sat Oct 22 02:56:45 2011] [error] [client 127.0.0.1] Premature end of script headers: fst.cgi
My script is
#!/usr/bin/perl
print "Content-type:text/html\n\n";
print "hello world";
I have set the permissions of the file...
I have also added the following line in file apache.conf
:
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory /usr/lib/cgi-bin/>
Options +ExecCGI
</Directory>
AddHandler cgi-script .cgi .pl
But still it is showing me the same error. I have done all the possible changes, but I didn't get any success...
#!/usr/bin/perl
? – dma_k#!/usr/bin/perl
. – dma_ksudo apt install php-cgi
– jave.web