Find the answers to your questions and get the support you need with the VentraIP help centre.
Installing and running Perl scripts in cPanel
Installing a Perl Module
- Log in to cPanel.
- Click on Perl Modules under Software.
- Under Find a Perl Module, input your search term.
- Click Go.
If you then want to install one of the Perl Modules, you can simply click Install next to your desired module.
Before running the script
- Add the following code to your .htaccess file, to ensure your Perl scripts are run correctly
Options +ExecCGI AddHandler cgi-script .pl
- Ensure that your Perl script is located in the cgi-bin folder You can locate the cgi-bin folder by navigating to the folder your website is in (usually public_html)
- Make sure your script starts with the following code, this will ensure that the script is run as a Perl script:
Making your script executable
chmod +x /path/to/perl/script.pl
Running your Perl script
There are two key ways a script can be run:
- Accessing the script via the web browser: E.g. https://my-domain-name.com/cgi-bin/script.pl
- Running the script via the command line
We Are Here to Help You
Get in touch with one of our local experts at any time.