DirectAdmin Site-Helper

Helping you get the most out of DirectAdmin and your web!

# Running Scripts

This section covers CGI scripts, program paths, viewing installed Perl modules, understanding permissions, PHP scripts, and accessing phpMyAdmin.

# CGI Scripts

All CGI scripts must be placed in your cgi-bin directory. The cgi-bin folder is located in your public_html directory (e.g. public_html/cgi-bin). If you want to run CGI script in a subdomain, put the script the subdomain's cgi-bin directory.

To find more about directory structure click here.

# Uploading CGI Scripts

When using FTP, it is very important to upload script files (e.g. .cgi and .pl) in ASCII mode. FTP clients will give you the option of uploading in ASCII, binary, or "auto." If "auto" is selected, then make sure .cgi and .pl are considered ASCII files by your FTP client. Scripts will not execute properly if they are uploaded in binary mode.

Be sure to follow the directions included with the CGI script.

To find more about uploading files to your server click here.

# Program Paths

The following paths are commonly needed by scripts.

Path to pearl:  
/usr/bin/pearl  

Path to sendmail:  
/usr/sbin/sendmail  

CGI URL:  
http://www.yourdomain.com/cgi-bin/script.cgi  
Subdomain CGI URL:  
http://subdomain.yourdomain.com/cgi-bin/script.cgi  

Path to cgi-bin:  
/home/username/domains/domain.com/public\_html/cgi-bin  
Path to cgi-bin (subdomain):
/home/username/domains/domain.com/public\_html/subdomain/cgi-bin    
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

Important: If these paths don't work, it is possible that your host has installed your account on somewhere other than /home. Please contact them to get the correct paths.

# Viewing Installed Perl Modules

From the main control panel menu click the "Advanced Tools" icon, then the "Installed Perl Modules" icon.

scripts per modules

scripts per modules

Picture below is a sample cutout of the perl modules list. If a CGI script requires a specific perl module, check with this list to confirm that the module is installed on the server. scripts example

# Understanding Permissions

File permissions define who can read, write, and execute files such as scripts. When the installation instructions ask you to CHMOD a file, you are being asked to set file permissions. File permissions can by modified by most popular FTP clients or through the control panel's built-in file manager.

Some common permission levels for files are:

  • 600 Makes a file inaccessible
  • 644 Readable by everyone (e.g. HTML documents)
  • 666 File can be read and modified (e.g. for HTML files modified by scripts)
  • 755 File can be read and executed by everyone (e.g. for scripts)
  • 777 Writable and executable by everyone (not recommended)

Most scripts need to be set to 755. Please refer to the script's documentation for proper installation instructions.

To learn more about file permissions click here.open in new window

# PHP Scripts

PHP scripts are fully supported on all servers running DirectAdmin Web Control Panel. PHP scripts may be placed and executed in any folder within your public_html directory. Please refer to the script's documentation for proper file permission and install procedures.

# Accessing phpMyAdmin

To access phpMyAdmin, sign into the control panel and then click on the "Extra Features" icon, followed by the "phpMyAdmin" link.

phpmyadmin access

phpmyadmin access

phpMyAdmin is a tool written in PHP that allows you to administrate your MySQL databases. You can execute SQL statements, work with fields (add, edit, delete), work with tables (create, alter, drop), create additional databases, and much more. Keep in mind that phpMyAdmin is designed for advanced users.

You can find more info how to use phpMyAdmin here.open in new window

# Need more help?

Please contact your hosting company for more assistance, or visit the DirectAdmin support forum at http://forum.directadmin.comopen in new window.