GoDaddy Support


Connecting to a MySQL Database Using CGI/Perl

This example describes using CGI/Perl to connect to a MySQL Database.
#!/usr/bin/perl use cPanelUserConfig;
print “ContentType: text/html\n\n”;

use DBI;

# Connecting to the database
# Replace DATABASENAME with the name of the database,
# HOSTNAME with the hostname/ip address of the MySQL server.
$drh = DBI->install_driver(“mysql”);
$dsn = “DBI:mysql:database=your_databasename;”;
$dbh = DBI->connect($dsn,\’your_dbusername\’,\’your_dbpassword\’);

# Select the data and display to the [...]

What paths do I use to upload PERL files and use the PERL interpreter?

You can publish your PERL files to any directory.
NOTE: The file’s permissions must be set to execute to work.

If your account supports CGI or Perl (more info), the system path to our Perl interpreter is:
CGI binaries must end in .cgi or .pl. You cannot use /cgi-bin/ with [...]

Can I add Perl Modules to my hosting account?

No, you cannot add additional Perl Modules to the server. However, we have installed most common Perl modules.

To View Installed Perl Modules

SSH to your hosting account. For more information, see Enable SSH.
Run the following command:
perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \ ‘find { wanted => sub { print canonpath $_ if /\.pm\z/ [...]

Perl Details on Linux Shared Hosting

Posted: 9/10/12 in Perl

Here are details about the way Perl is set up on our Linux shared hosting servers:
NOTE: Perl scripts written and saved in a Windows environment, and then uploaded to your server, will not run in a Linux environment.

Perl Version
Perl 5.8.8

Disabled Perl Modules

NEED HELP? Call our award-winning support team 24/7 at (480) 505-8877

United States - English
Traffic Log Image