Page 1 of 1

PERL DOES NOT WORK

Posted: Sun Dec 20, 2015 2:09 pm
by webdotapp
Hello,

I have tried to place following simple .pl script in web/domain/cgi-bin folder, and given its 755 permission, but when i try to load it into browser, it asks to download the file instead of execution.

Code: Select all

#!/usr/bin/perl

print "content-type: text/html \n\n";
Please help. Thanks

Re: PERL DOES NOT WORK

Posted: Mon Dec 21, 2015 6:57 am
by skurudo
Works fine, but need a little adjustment in apache virtual host:

Code: Select all

<Directory /your-directory>
Options +ExecCGI
AddHandler cgi-script .cgi
DirectoryIndex index.cgi
</Directory>

Re: PERL DOES NOT WORK

Posted: Sat Sep 01, 2018 11:46 pm
by host79
didn't work, still asking for download page

Re: PERL DOES NOT WORK

Posted: Sat Sep 01, 2018 11:59 pm
by host79
get this done!
need to change web template in domain properties to 'phpcgi' and then put this .htaccess in public_html folder.

Code: Select all

AddHandler cgi-script .cgi
Options +ExecCGI