Can't get perl scripts to execute

Posted October 30, 2015 13.2k views
DebianLAMP StackPerl
is my current project, I have made it to step 4 of the installation process, where it wants me to access from my browser. it is supposed to execute, however all that seems to happen is it displays the contents of the file or attempts to download it. Any help would be appreciated.

Currently on Debian 8

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
3 answers

The installation steps in that repo seem to assume that your webserver is already configured to run perl CGI scripts. This isn’t the case out of the box. With Apache, there are a few things you’ll need to do. First, enable handling CGI scripts by adding this to your Apache VirtualHost:

<Directory "/var/www/html">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    AddHandler cgi-script .pl
    Order allow,deny
    Allow from all

Then enable the CGI mod and restart Apache for your changes to take effect:

  • a2enmod cgi
  • service apache2 restart

Remember to make sure that the www-data user has correct permissions for the files as well.

You can find more information about using CGI scripts with Apache in this article:

While it targets Ubuntu, it will be very similar for Debian.

by Justin Ellingwood
This article will teach you how to use SuExec in Apache to run CGI scripts on an Ubuntu VPS.

Alright, going to try that now, I’ll let you know the results

So that issue got resolved, I believe I am having an issue related to step 3 now, I am very inexperienced with sql and am not entirely sure what this error is asking of me.

Software error:

No SQL settings defined in the configuration at line 8.
BEGIN failed–compilation aborted at config line 154.
Compilation failed in require at /var/www/html/ line 19.
BEGIN failed–compilation aborted at /var/www/html/ line 19