LINUX WEBSITE DOCUMENTATION: All Cpanel Enabled Account Types

index

Advanced tutorials
Mail Forms: Creating from scratch on a Cpanel server
Mail Forms: Securing a form from hackers
Mail Forms: Using Captcha Verification
Mail Forwarding warning: read before you forward
Dreamweaver: Connecting and Uploading

Dedicated and VPS server owners only:
Clearing frozen emails from exim
Nulling a file (reset a file to zero bytes)
Setting up a second shared ip address
Installing imagemagick on a cpanel server
Binding IPS to a server (Installing New IP addresses)
Scanning a server for dangeorus 777 files
MySQL Manager Connections to Root (Navicat)
MySQL: copying and restoring databases

TRANSFER OF FILES

Note: You can upload and download files via three methods: FTP (file transfer protocol), Microsoft Frontpage, or via the file manager in your control panel.  We recommend ftp as the best and most foolproof way of transfering files.  Do not mix and match methods as using ftp and frontpage on the same file will result in corruption.

USING CGI

More...

BUILT-IN SHOPPING CART SCRIPTS:

Please note that these scripts can be controlled and installed by logging onto your web control panel.  As such documentation for these scripts assumes you are already logged onto your panel.

Agora Shopping Cart System
OS Commerce Shopping Cart System
EMAIL FORMS: FORMMAIL

Formmail is a simple form processor that allows you to create a fill-in form that can be emailed to you.  We have a new advanced tutorial for email forms


OUR NEW ADVANCED TUTORIAL: CREATING EMAIL FORMS

EMAIL FORMS: CAPTCHA

Captcha allows you to secure a form from spammers by making people enter a rotating verification code before a form sends.  We provide a tutorial of how to install a captcha form on most accounts.


OUR NEW ADVANCED TUTORIAL: CREATING CAPTCHA FORMS



Installing my own version of Formmail:

You can install your own version of formmail into the system.  However, make sure it is fully secured.  We can't allow scripts that spammers may attack on the system and reserve the right to remove such instances of formmail without norice.  Also, please give any custom instance of formmail a unique name (other than formmail or smartmail).

CGI EMAIL

CGIEMAIL is another form handler that is built into the system by default.  It handles things a little diferently, using a template file to allign all of your results.  The best way to describe its use is through an example:  In your HTML file create a form using the following code:

<form action="http://www.yourdomain.com/cgi-sys/cgiemail/questions.txt" method="POST">

questions.txt is the name of the template file you will create later.  You can of course replace this with any other name.  Now, continuing with the example, we ask the user for his email address and a comment:

<input type=text size=20 name=email>
<input type=text size=20 name=comment>
</form>

Ok the form is made.  Now all we need to do is create a text file template called questions.txt to accept the answers and email them to you.  You need to put it in the same directory the form is located in.  In this example it would look like the following:

To: insert your email address here
Subject: insert whatever subjec tyouw ant here

User's email address:             [email]
User's comment:                    [comment]

Save the file...your done and it should work.  Lots of advancd features as well as redirecting to a success page and specifying required fields are available here.


OTHER CGI SCRIPTS (INSTALLING YOUR OWN SCRIPTS)
Using Cpanel's Built In Page Editor:
The most recent release of Cpanel includes a WYSWYG html file editor that is pretty powerful.  To access the free editor go into the control panel and click on FILE MANAGER.  Click on the icon to the LEFT of public_html to make sure you are in the public_html directory.

Create a new html file (let's say test.html)

Once created, click on the name of the file (test.html) from the file list.  Many options should open up on the right side on cpanel.  Among them is the HTML EDITOR.  Click on that.  Allow the editor to load a few seconds.  Once its loads it will resemble a word processor where you can add text, pictures, align, add links etc.

Please note that many hidden options can be selected by right clicking in the editor.  For instance highlighing text and right clicking on that text will allow you to create links, etc.

To save your progress click on the DISK icon in the upper left.  We suggest saving progress often.  If you browser or internet connection goes bad your progress will be lost if not saved.
Path to perl:
The path to perl on the server is:

/usr/local/bin/perl

Thus all cgi programs should start with the following line at the top of the program:

#!/usr/local/bin/perl

Running CGI programs directly from the CGI-BIN directory:
If you run a program directory from the cgi-bin directory, the path to access the script (for example myscript.pl) is:

action="cgi-bin/myscrpt.pl"

Refer to the section below for the conditions that have to be met to make a cgi program run.

Where do I put my USER-CREATED CGI programs?
Our servers have the capability to run CGI scripts based on Perl, Unix SH, KSH, CSH, and C/C++ languages (etc). Perl is our language of choice as it is a world standard and is well suited to CGI. In addition, Perl code does not require manual compilations whereas C/C++ code must be compiled on our web servers prior to use:

In order to run CGI programs, two conditions must be met:

  1. The script must have an extension of .pl in all cases.  If you wish to use .cgi (or another extension) simply create a Apache handler from the control panel.
  2. The script must be marked as executable. This is done with the chmod command. If you are logged in via SSH, use chmod 755 If you are logged in via FTP, use quote site exec chmod 755 scriptname.cgi in the appropriate directory. This may not work well with all FTP clients.  You can also change permissions using your control panel file manager.

  3. A note for users of Frontpage:  If you use FP you must chmod files and directories with 775 instead, to avoid conflicts.

    IN ADDITION:

  4. Here are some helpful tips to follow when installing Perl scripts:
How do I see the errors from CGI programs?
Errors from CGI programs normally go into the Web server's error logs which are viewable from your control panel, or sometimes they go nowhere at all. They do not normally go to your Web browser. The error messages given for the failure of a CGI script are very generic and distinctly unhelpful.

An easy way to detect script errors is to logon via SSH and run the script directly from the system shell.  For example with command perl myscript.pl.  This will list errors that the system detects.  They are not specific but they may help you track down bad code.

JAVA, Compiling: ASP, Apache .ASP
Apache servers have built-in .asp functionality.  With Apache .ASP you can make perl and script calls.  Please note that Apache does not support javascript or other vscript calls native to chilisoft due to their large security hole issues.  However, you can make such calls via PHP much more effeciently.  If you have previously used chilisoft .asp and need to convert to PHP there is a great internet tool to do it.  Check out the link below.

Apache ASP primer

ASP-2-PHP conversion tool and info

Sendmail, Where is it Anyways?
The physical location of sendmail on your pro-series server is normally:
typically /usr/sbin/sendmail

if yours is not present there you can locate it with the following SSH command:

whereis sendmail

Using my Email Account

CONFIGURING A POP or IMAP EMAIL PROGRAM
The following is the general syntax one should use when configuring an email program on this server.  Please note that their is a syntax difference in configuring the primary email box of an account as opposed to all other boxes, which we will describe.  Directly below this general syntax are specific examples for common email programs such as Outlook and Eudora.
Setting up email for Eudora Email Software version 3:
Setting up email for Eudora Email Software version 4 or later:
Setting up email for Outlook, Netscape and Microsoft:
PINE: Sending Email Directly from your account Shell::
Pine is a special email program built into your account shell (SSH logon).  It is accessible via the lowecase command pine after you logon to your shell.  Its best use it to delete old email or spam that may clog up in your main mailbox.  But you can also send email direcly from it in case of emergency when normal POP programs may fail.

Pine will access your main mailbox, none of your secondary boxes.  To send, receive and delete mail follow the straightforward commands that appear on the screen when you activate the pine command.  For details information on pine, visit this website.

Changing your email and return addresses in pine:

Before sending email with pine it is important that you set the email address you want your receivers to see, otherwise pine will default to an return email address that is 99% of the time not what you want.  To do this, enter pine.  Press S for setup and then C for Config.

You will see a list of a lot of options.  Most should not be touched.

  1. Select personal-name, press return, enter your name and then press return again
  2. Select user-domain, enter your domain name minus the www (example: webcs.com), and then press return
  3. Scroll along way down the options (very long way) and you will see an item called customized-hdrs.  Select it by pressing return and then enter the following corresponding to your real name and the email address you want receivers to reply to::: For example we will assume your return address is bunny@ears.com and your name is Peter Rabbit:

  4.  

     
     
     
     
     

    From: "Peter Rabbit" <bunny@ears.com>
     

    Now press return

  5. Select E for exit and your configuration should be setup properly.  You are ready to send email with pine.
Setting up a signature via pine:

Press S for setup and S agian for signature.  Enter your signature which will appear at the bottom of all emails send through pine.  Press control-E to exit when you are done.

Access your Email Via Web Browser